aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-07-20 00:31:36 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-07-20 00:31:36 +0300
commit887ec4af81dd56b798e360194299eea6b81d99ac (patch)
tree38c241ed4ad696636447e704a599ce35536d204e /frontend/src/components
parentquick link fix (diff)
downloadlphub-887ec4af81dd56b798e360194299eea6b81d99ac.tar.gz
lphub-887ec4af81dd56b798e360194299eea6b81d99ac.tar.bz2
lphub-887ec4af81dd56b798e360194299eea6b81d99ac.zip
feat: about page
Former-commit-id: 103850ab3128cf9042565a59b216cd2dac553682
Diffstat (limited to 'frontend/src/components')
-rw-r--r--frontend/src/components/pages/about.css17
-rw-r--r--frontend/src/components/pages/about.js32
2 files changed, 49 insertions, 0 deletions
diff --git a/frontend/src/components/pages/about.css b/frontend/src/components/pages/about.css
new file mode 100644
index 0000000..0dec300
--- /dev/null
+++ b/frontend/src/components/pages/about.css
@@ -0,0 +1,17 @@
1
2#about {
3 overflow: auto;
4 overflow-x: hidden;
5 position: relative;
6
7 width: calc(100% - 380px);
8 height: 100vh;
9 left: 350px;
10
11 padding-right: 30px;
12
13 font-size: 40px;
14 font-family: BarlowSemiCondensed-Regular;
15 color: #cdcfdf;
16
17}
diff --git a/frontend/src/components/pages/about.js b/frontend/src/components/pages/about.js
new file mode 100644
index 0000000..a265006
--- /dev/null
+++ b/frontend/src/components/pages/about.js
@@ -0,0 +1,32 @@
1import React, { useState, useEffect } from 'react';
2import ReactMarkdown from 'react-markdown';
3
4import "./about.css";
5
6export 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/LeastPortals/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};