diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2024-09-03 00:08:53 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2024-09-03 00:08:53 +0300 |
| commit | a65d6d9127c3fa7f6a8ecaec5d1ffd1f47c2bc98 (patch) | |
| tree | edf8630e9d6426124dd49854af0cb703ebc5b710 /frontend/src/components/pages/about.js | |
| parent | fix: revert to static homepage (#195) (diff) | |
| download | lphub-a65d6d9127c3fa7f6a8ecaec5d1ffd1f47c2bc98.tar.gz lphub-a65d6d9127c3fa7f6a8ecaec5d1ffd1f47c2bc98.tar.bz2 lphub-a65d6d9127c3fa7f6a8ecaec5d1ffd1f47c2bc98.zip | |
refactor: port to typescript
Diffstat (limited to 'frontend/src/components/pages/about.js')
| -rw-r--r-- | frontend/src/components/pages/about.js | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/frontend/src/components/pages/about.js b/frontend/src/components/pages/about.js deleted file mode 100644 index 11b065d..0000000 --- a/frontend/src/components/pages/about.js +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | import React, { useState, useEffect } from 'react'; | ||
| 2 | import ReactMarkdown from 'react-markdown'; | ||
| 3 | |||
| 4 | import "./about.css"; | ||
| 5 | |||
| 6 | export default function About() { | ||
| 7 | const [aboutText, setAboutText] = useState(''); | ||
| 8 | |||
| 9 | useEffect(() => { | ||
| 10 | const fetchReadme = async () => { | ||
| 11 | try { | ||
| 12 | const response = await fetch( | ||
| 13 | 'https://raw.githubusercontent.com/pektezol/leastportalshub/main/README.md' | ||
| 14 | ); | ||
| 15 | if (!response.ok) { | ||
| 16 | throw new Error('Failed to fetch README'); | ||
| 17 | } | ||
| 18 | const readmeText = await response.text(); | ||
| 19 | setAboutText(readmeText); | ||
| 20 | } catch (error) { | ||
| 21 | console.error('Error fetching README:', error); | ||
| 22 | } | ||
| 23 | }; | ||
| 24 | fetchReadme(); | ||
| 25 | }, []); | ||
| 26 | |||
| 27 | return ( | ||
| 28 | <div id="about"> | ||
| 29 | <ReactMarkdown>{aboutText}</ReactMarkdown> | ||
| 30 | </div> | ||
| 31 | ); | ||
| 32 | }; | ||