|
1 | 1 | import React from 'react'; |
2 | | -import PropTypes from 'prop-types'; |
3 | 2 | import { useSelector } from 'react-redux'; |
4 | 3 | import { Helmet } from 'react-helmet'; |
5 | 4 | import { useTranslation } from 'react-i18next'; |
@@ -28,9 +27,27 @@ import packageData from '../../../../package.json'; |
28 | 27 | import HeartIcon from '../../../images/heart.svg'; |
29 | 28 | import AsteriskIcon from '../../../images/p5-asterisk.svg'; |
30 | 29 | import LogoIcon from '../../../images/p5js-square-logo.svg'; |
31 | | -import type { AboutSectionInfoSection } from '../statics/aboutData'; |
32 | 30 | import { RootState } from '../../../reducers'; |
33 | 31 |
|
| 32 | +export interface AboutSectionInfoItem { |
| 33 | + url: string; |
| 34 | + title: string; |
| 35 | + description: string; |
| 36 | +} |
| 37 | +export interface AboutSectionInfoSection { |
| 38 | + header: string; |
| 39 | + items: AboutSectionInfoItem[]; |
| 40 | +} |
| 41 | +export interface ContactSectionLink { |
| 42 | + label: string; |
| 43 | + href: string; |
| 44 | +} |
| 45 | + |
| 46 | +export interface AboutSectionProps { |
| 47 | + section: AboutSectionInfoSection; |
| 48 | + t: TFunction<'translation'>; |
| 49 | +} |
| 50 | + |
34 | 51 | const AboutSection = ({ |
35 | 52 | section, |
36 | 53 | t |
@@ -169,17 +186,3 @@ export const About = () => { |
169 | 186 | </RootPage> |
170 | 187 | ); |
171 | 188 | }; |
172 | | - |
173 | | -AboutSection.propTypes = { |
174 | | - section: PropTypes.shape({ |
175 | | - header: PropTypes.string.isRequired, |
176 | | - items: PropTypes.arrayOf( |
177 | | - PropTypes.shape({ |
178 | | - url: PropTypes.string.isRequired, |
179 | | - title: PropTypes.string.isRequired, |
180 | | - description: PropTypes.string.isRequired |
181 | | - }) |
182 | | - ).isRequired |
183 | | - }).isRequired, |
184 | | - t: PropTypes.func.isRequired |
185 | | -}; |
|
0 commit comments