diff options
| author | FifthWit <fifthwitbusiness@gmail.com> | 2025-01-30 10:44:30 -0600 |
|---|---|---|
| committer | FifthWit <fifthwitbusiness@gmail.com> | 2025-01-30 10:44:30 -0600 |
| commit | e40f07211f5f15dcb138e2520a76d13afd3c0cfd (patch) | |
| tree | 46bad6a17e66d55a4a65088c0b6eb8c48641615a /frontend/src/pages/About.tsx | |
| parent | added prettier for more consistency (diff) | |
| download | lphub-e40f07211f5f15dcb138e2520a76d13afd3c0cfd.tar.gz lphub-e40f07211f5f15dcb138e2520a76d13afd3c0cfd.tar.bz2 lphub-e40f07211f5f15dcb138e2520a76d13afd3c0cfd.zip | |
formatted with prettier
Diffstat (limited to 'frontend/src/pages/About.tsx')
| -rw-r--r-- | frontend/src/pages/About.tsx | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/frontend/src/pages/About.tsx b/frontend/src/pages/About.tsx index a8b7826..a5d34f6 100644 --- a/frontend/src/pages/About.tsx +++ b/frontend/src/pages/About.tsx | |||
| @@ -5,36 +5,34 @@ import { Helmet } from 'react-helmet'; | |||
| 5 | import '@css/About.css'; | 5 | import '@css/About.css'; |
| 6 | 6 | ||
| 7 | const About: React.FC = () => { | 7 | const About: React.FC = () => { |
| 8 | const [aboutText, setAboutText] = React.useState<string>(''); | ||
| 8 | 9 | ||
| 9 | const [aboutText, setAboutText] = React.useState<string>(""); | 10 | React.useEffect(() => { |
| 11 | const fetchReadme = async () => { | ||
| 12 | try { | ||
| 13 | const response = await fetch( | ||
| 14 | 'https://raw.githubusercontent.com/pektezol/lphub/main/README.md' | ||
| 15 | ); | ||
| 16 | if (!response.ok) { | ||
| 17 | throw new Error('Failed to fetch README'); | ||
| 18 | } | ||
| 19 | const readmeText = await response.text(); | ||
| 20 | setAboutText(readmeText); | ||
| 21 | } catch (error) { | ||
| 22 | console.error('Error fetching README:', error); | ||
| 23 | } | ||
| 24 | }; | ||
| 25 | fetchReadme(); | ||
| 26 | }, []); | ||
| 10 | 27 | ||
| 11 | React.useEffect(() => { | 28 | return ( |
| 12 | const fetchReadme = async () => { | 29 | <div id="about"> |
| 13 | try { | 30 | <Helmet> |
| 14 | const response = await fetch( | 31 | <title>LPHUB | About</title> |
| 15 | 'https://raw.githubusercontent.com/pektezol/lphub/main/README.md' | 32 | </Helmet> |
| 16 | ); | 33 | <ReactMarkdown>{aboutText}</ReactMarkdown> |
| 17 | if (!response.ok) { | 34 | </div> |
| 18 | throw new Error('Failed to fetch README'); | 35 | ); |
| 19 | } | ||
| 20 | const readmeText = await response.text(); | ||
| 21 | setAboutText(readmeText); | ||
| 22 | } catch (error) { | ||
| 23 | console.error('Error fetching README:', error); | ||
| 24 | } | ||
| 25 | }; | ||
| 26 | fetchReadme(); | ||
| 27 | }, []); | ||
| 28 | |||
| 29 | |||
| 30 | return ( | ||
| 31 | <div id="about"> | ||
| 32 | <Helmet> | ||
| 33 | <title>LPHUB | About</title> | ||
| 34 | </Helmet> | ||
| 35 | <ReactMarkdown>{aboutText}</ReactMarkdown> | ||
| 36 | </div> | ||
| 37 | ); | ||
| 38 | }; | 36 | }; |
| 39 | 37 | ||
| 40 | export default About; | 38 | export default About; |