diff --git a/src/App.css b/src/App.css
index 7a1523e..c43f134 100644
--- a/src/App.css
+++ b/src/App.css
@@ -3,3 +3,8 @@
.App {
text-align: center;
}
+
+.App .App-content {
+ display: flex;
+ justify-content: center;
+}
diff --git a/src/App.tsx b/src/App.tsx
index 8a2dd13..0dbde27 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,19 +1,20 @@
import './App.css';
-import { Header } from "./components/header";
-import { RegForm } from './components/regForm';
-import { BrowserRouter as Router, Switch, Route } from "react-router-dom";
+import { BrowserRouter as Router, Switch, Route, Redirect } from "react-router-dom";
+import { Main } from './pages/Main';
+import { Registration } from './pages/Registration';
export default function App() {
return (
-
+
-
+
-
+
+
-
+
);
}
diff --git a/src/components/header.tsx b/src/components/Header.tsx
similarity index 84%
rename from src/components/header.tsx
rename to src/components/Header.tsx
index 6ff49fd..eacd691 100644
--- a/src/components/header.tsx
+++ b/src/components/Header.tsx
@@ -1,4 +1,4 @@
-import "./../styles/header.css"
+import "./styles/header.css"
export const Header = () => {
return (
diff --git a/src/components/Menu.tsx b/src/components/Menu.tsx
new file mode 100644
index 0000000..d1a2f09
--- /dev/null
+++ b/src/components/Menu.tsx
@@ -0,0 +1,56 @@
+import "./styles/menu.css";
+
+export const Menu = () => {
+ return (
+
+ Menu
+
+
+ |
+ Starters |
+ |
+
+
+ | Chrumky |
+ Very good yummy yummy. Lorem ipsum dolor sit amet. |
+ Nuts |
+
+
+ | Halusky |
+ Fatty fat stuff. |
+ Meat, fat |
+
+
+ |
+ Main dish |
+ |
+
+
+ | Chrumky |
+ Very good yummy yummy. Lorem ipsum dolor sit amet. |
+ Nuts |
+
+
+ | Halusky |
+ Fatty fat stuff. |
+ Meat, fat |
+
+
+ |
+ Dessert |
+ |
+
+
+ | Chrumky |
+ Very good yummy yummy. Lorem ipsum dolor sit amet. |
+ Nuts |
+
+
+ | Halusky |
+ Fatty fat stuff. |
+ Meat, fat |
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/src/components/NotFound.tsx b/src/components/NotFound.tsx
new file mode 100644
index 0000000..1fbaa7e
--- /dev/null
+++ b/src/components/NotFound.tsx
@@ -0,0 +1,10 @@
+import "./styles/notFound.css";
+
+export const NotFound = () => {
+ return (
+
+ Page not found
+ Check the link address...
+
+ )
+}
\ No newline at end of file
diff --git a/src/components/Program.tsx b/src/components/Program.tsx
new file mode 100644
index 0000000..9c5b7aa
--- /dev/null
+++ b/src/components/Program.tsx
@@ -0,0 +1,57 @@
+import { Link } from 'react-router-dom';
+import "./styles/program.css";
+
+export const Program = () => {
+ return (
+
+ Program
+
+
+ |
+ 12:00 |
+ |
+
+
+ | Speech |
+ Boring BS. Lorem ipsum dolor sit amet. |
+ Veikko |
+
+
+ | Lunch |
+ Eating yummy yum. |
+ To menu |
+
+
+ |
+ 14:00 |
+ |
+
+
+ | Games |
+ Activity lol. |
+ Be active. |
+
+
+ | More something |
+ Lorem ipsum dolor sit amet. |
+ More more more |
+
+
+ |
+ 23:00 |
+ |
+
+
+ | More something |
+ Lorem ipsum dolor sit amet. |
+ More more more |
+
+
+ | More something |
+ Lorem ipsum dolor sit amet. |
+ More more more |
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/src/components/regForm.tsx b/src/components/RegForm.tsx
similarity index 96%
rename from src/components/regForm.tsx
rename to src/components/RegForm.tsx
index 8025d04..8021631 100644
--- a/src/components/regForm.tsx
+++ b/src/components/RegForm.tsx
@@ -1,8 +1,8 @@
-import { Button, Checkbox, Col, Form, Input, Row, Select, Space } from 'antd';
+import { Button, Checkbox, Col, Form, Input, Row, Select } from 'antd';
import { useParams } from 'react-router';
import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons';
-import "./../styles/registration.css"
+import "./styles/regForm.css";
import { addVisitor } from '../api';
import { arrayToString, capFirstLetter } from './utils';
import { Visitor } from '../model/visitor';
@@ -49,7 +49,7 @@ export const RegForm = () => {
<>
{
fields.map(field => (
-
+
{
+ return (
+
+ )
+}
\ No newline at end of file
diff --git a/src/styles/header.css b/src/components/styles/header.css
similarity index 83%
rename from src/styles/header.css
rename to src/components/styles/header.css
index 924df6c..4d7700e 100644
--- a/src/styles/header.css
+++ b/src/components/styles/header.css
@@ -1,6 +1,5 @@
.App-header {
background-color: #282c34;
- min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
@@ -8,3 +7,7 @@
font-size: calc(10px + 2vmin);
color: white;
}
+
+.App-header h1 {
+ color: white;
+}
diff --git a/src/components/styles/menu.css b/src/components/styles/menu.css
new file mode 100644
index 0000000..ebe2dfc
--- /dev/null
+++ b/src/components/styles/menu.css
@@ -0,0 +1,21 @@
+table {
+ width: 100%;
+}
+
+table,
+td,
+th {
+ border-bottom: 1px solid black;
+}
+
+th {
+ height: 10vh;
+}
+
+tr {
+ line-break: auto;
+}
+th,
+td {
+ width: 33%;
+}
diff --git a/src/components/styles/notFound.css b/src/components/styles/notFound.css
new file mode 100644
index 0000000..e69de29
diff --git a/src/components/styles/program.css b/src/components/styles/program.css
new file mode 100644
index 0000000..ebe2dfc
--- /dev/null
+++ b/src/components/styles/program.css
@@ -0,0 +1,21 @@
+table {
+ width: 100%;
+}
+
+table,
+td,
+th {
+ border-bottom: 1px solid black;
+}
+
+th {
+ height: 10vh;
+}
+
+tr {
+ line-break: auto;
+}
+th,
+td {
+ width: 33%;
+}
diff --git a/src/styles/registration.css b/src/components/styles/regForm.css
similarity index 93%
rename from src/styles/registration.css
rename to src/components/styles/regForm.css
index 1f62477..88b7045 100644
--- a/src/styles/registration.css
+++ b/src/components/styles/regForm.css
@@ -9,7 +9,7 @@ form#registration {
align-items: baseline;
}
-.visitorContainer {
+.visitors {
margin-top: 1em;
margin-bottom: 1em;
padding: 1em;
diff --git a/src/components/styles/sideNav.css b/src/components/styles/sideNav.css
new file mode 100644
index 0000000..9f805b8
--- /dev/null
+++ b/src/components/styles/sideNav.css
@@ -0,0 +1,3 @@
+.SideNav {
+ width: 333px;
+}
diff --git a/src/pages/Main.tsx b/src/pages/Main.tsx
new file mode 100644
index 0000000..60e4fcc
--- /dev/null
+++ b/src/pages/Main.tsx
@@ -0,0 +1,27 @@
+import "./styles/main.css";
+
+import { useParams } from "react-router-dom";
+import { Menu } from '../components/Menu';
+import { Header } from '../components/Header';
+import { SideNav } from '../components/SideNav';
+import { Program } from '../components/Program';
+import { NotFound } from '../components/NotFound';
+
+interface MainParams {
+ page: string
+}
+
+export const Main = () => {
+ const { page } = useParams()
+
+ return (
+ <>
+
+
+
+ {page === "menu" ? : page === "program" ? : }
+
+
+ >
+ )
+}
\ No newline at end of file
diff --git a/src/pages/Registration.tsx b/src/pages/Registration.tsx
new file mode 100644
index 0000000..5d497d1
--- /dev/null
+++ b/src/pages/Registration.tsx
@@ -0,0 +1,15 @@
+import "./styles/registration.css";
+
+import { Header } from '../components/Header'
+import { RegForm } from '../components/RegForm'
+
+export const Registration = () => {
+ return (
+ <>
+
+
+
+
+ >
+ )
+}
\ No newline at end of file
diff --git a/src/pages/styles/main.css b/src/pages/styles/main.css
new file mode 100644
index 0000000..e69de29
diff --git a/src/pages/styles/registration.css b/src/pages/styles/registration.css
new file mode 100644
index 0000000..21a4469
--- /dev/null
+++ b/src/pages/styles/registration.css
@@ -0,0 +1,4 @@
+.Registration-form {
+ display: flex;
+ justify-items: center;
+}
diff --git a/src/shared.css b/src/shared.css
new file mode 100644
index 0000000..e69de29