diff --git a/.gitignore b/.gitignore index fd3dbb5..4fc911e 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts +app/test/* diff --git a/app/components/form.tsx b/app/components/form.tsx index 71457a0..bf5a932 100644 --- a/app/components/form.tsx +++ b/app/components/form.tsx @@ -1,10 +1,10 @@ 'use client'; import { useState } from "react"; -const Form = ({ initialData, onSubmit }) => { +const Form = ({ initialData, submitFunction }) => { const [formData, setFormData] = useState( initialData ); - const handleSubmit = (event) => { + const handleSubmit = async (event) => { event.preventDefault(); //q = formData; @@ -13,7 +13,7 @@ const Form = ({ initialData, onSubmit }) => { //console.log( `Adding question ${JSON.stringify(q)}` ); - onSubmit( formData ); + await submitFunction( formData ); } const handleChange = (event) => { @@ -27,13 +27,13 @@ const Form = ({ initialData, onSubmit }) => { return (
- {Object.entries( initialData ).map( (key, val) => { + {Object.entries( initialData ).map( (elem) => { return( )})} diff --git a/app/components/logo.tsx b/app/components/logo.tsx new file mode 100644 index 0000000..c3469ed --- /dev/null +++ b/app/components/logo.tsx @@ -0,0 +1,11 @@ +const Logo = () => { + return ( +
+ + + +
+ ) +} + +export default Logo; \ No newline at end of file diff --git a/app/components/topic_card.tsx b/app/components/topic_card.tsx index 112a3fa..e7bc881 100644 --- a/app/components/topic_card.tsx +++ b/app/components/topic_card.tsx @@ -1,7 +1,6 @@ - const TopicCard = ({ title, children, link }) => { return( -
+
{ {children}

-
-
-
-

- Start - now! -

+ -
) } -export default TopicCard; \ No newline at end of file +export default TopicCard; diff --git a/app/sessionconfig/page.tsx b/app/sessionconfig/page.tsx index 8d5d004..6e29fc9 100644 --- a/app/sessionconfig/page.tsx +++ b/app/sessionconfig/page.tsx @@ -1,5 +1,6 @@ import { CheckIcon } from '@heroicons/react/20/solid' import TopicCard from '../components/topic_card' +import Logo from '../components/logo'; const includedFeatures = [ 'Private forum access', @@ -13,26 +14,12 @@ export default function Example() { const cards = [ ["Learn cybersecurity", "Learning cybersecurity is like becoming a guardian of the digital realm.\nIt's about mastering the art of protecting information, systems, and networks from cyber threats.\nFrom understanding encryption algorithms to detecting malware, every lesson equips you with tools to fortify against cyber-attacks.", "/learn/cybersec" ], ["Learn geography", "It's cool ig", "/learn/geography"], - ["Learn C++", "Don't.", "/learn/cpp"], - ["Learn C", "Do.", "/learn/c"] + ["Learn C++", "Don't.", "/learn/cpp"] ]; return ( -
-