From 89560a61bc6e41d86acaea596762eda2da38fe50 Mon Sep 17 00:00:00 2001
From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>
Date: Mon, 9 Sep 2024 19:29:42 +0300
Subject: refactor: upload run form, lots of random shit

---
 frontend/src/pages/About.tsx | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 frontend/src/pages/About.tsx

(limited to 'frontend/src/pages/About.tsx')

diff --git a/frontend/src/pages/About.tsx b/frontend/src/pages/About.tsx
new file mode 100644
index 0000000..886808b
--- /dev/null
+++ b/frontend/src/pages/About.tsx
@@ -0,0 +1,36 @@
+import React from 'react';
+import ReactMarkdown from 'react-markdown';
+
+import '../css/About.css';
+
+const About: React.FC = () => {
+
+    const [aboutText, setAboutText] = React.useState<string>("");
+
+    React.useEffect(() => {
+        const fetchReadme = async () => {
+            try {
+                const response = await fetch(
+                    'https://raw.githubusercontent.com/pektezol/leastportalshub/main/README.md'
+                );
+                if (!response.ok) {
+                    throw new Error('Failed to fetch README');
+                }
+                const readmeText = await response.text();
+                setAboutText(readmeText);
+            } catch (error) {
+                console.error('Error fetching README:', error);
+            }
+        };
+        fetchReadme();
+    }, []);
+
+
+    return (
+        <div id="about">
+            <ReactMarkdown>{aboutText}</ReactMarkdown>
+        </div>
+    );
+};
+
+export default About;
-- 
cgit v1.2.3

