From 9dd0c749899799904c4a036e867f3857d090c790 Mon Sep 17 00:00:00 2001 From: ifraimka1 Date: Tue, 13 Feb 2024 15:49:05 +0300 Subject: [PATCH] routing --- src/components/Navbar/Navbar.jsx | 16 ++++++++-------- src/index.js | 20 ++++++++++++++++++++ src/routes/Aboutus.jsx | 14 ++++++++++++++ src/routes/Contact.jsx | 24 ++++++++++++------------ src/routes/Labs.jsx | 14 ++++++++++++++ src/routes/Main.jsx | 14 ++++++++++++++ src/routes/Projects.jsx | 14 ++++++++++++++ 7 files changed, 96 insertions(+), 20 deletions(-) create mode 100644 src/routes/Aboutus.jsx create mode 100644 src/routes/Labs.jsx create mode 100644 src/routes/Main.jsx create mode 100644 src/routes/Projects.jsx diff --git a/src/components/Navbar/Navbar.jsx b/src/components/Navbar/Navbar.jsx index a146131..84d4e2d 100644 --- a/src/components/Navbar/Navbar.jsx +++ b/src/components/Navbar/Navbar.jsx @@ -10,18 +10,18 @@ function Navbar() { SCB logo
- + ГЛАВНАЯ - - + + О НАС - - + + ЛАБОРАТОРИИ - - + + ПРОЕКТЫ - + КОНТАКТЫ diff --git a/src/index.js b/src/index.js index 1af7802..335bf9c 100644 --- a/src/index.js +++ b/src/index.js @@ -4,6 +4,10 @@ import { createHashRouter, RouterProvider, Outlet } from 'react-router-dom'; import Root from './routes/Root'; import ErrorPage from './error-page'; +import Main from './routes/Main'; +import Aboutus from './routes/Aboutus'; +import Labs from './routes/Labs'; +import Projects from './routes/Projects'; import Contact from './routes/Contact'; import reportWebVitals from './reportWebVitals'; import './index.scss'; @@ -15,6 +19,22 @@ const router = createHashRouter([ element: , errorElement: , children: [ + { + path: "/", + element:
, + }, + { + path: "/aboutus", + element: , + }, + { + path: "/labs", + element: , + }, + { + path: "/projects", + element: , + }, { path: "/contact", element: , diff --git a/src/routes/Aboutus.jsx b/src/routes/Aboutus.jsx new file mode 100644 index 0000000..4c333b7 --- /dev/null +++ b/src/routes/Aboutus.jsx @@ -0,0 +1,14 @@ +function Aboutus() { + return ( + <> +
+

About us

+
+
+ +
+ + ); +} + +export default Aboutus; \ No newline at end of file diff --git a/src/routes/Contact.jsx b/src/routes/Contact.jsx index 022c92c..4ad36c7 100644 --- a/src/routes/Contact.jsx +++ b/src/routes/Contact.jsx @@ -1,5 +1,3 @@ -import Navbar from '../components/Navbar/Navbar'; - function Contact() { return ( <> @@ -7,17 +5,19 @@ function Contact() {

Студенческое конструкторское бюро
"Компьютерное инновационное творчество"

-
-

Контактное лицо: Кутковой Владимир Сергеевич

+
+
+

Контактное лицо: Кутковой Владимир Сергеевич

+
+
+ + + + + + +
-
- - - - - - -
); } diff --git a/src/routes/Labs.jsx b/src/routes/Labs.jsx new file mode 100644 index 0000000..ddb24ea --- /dev/null +++ b/src/routes/Labs.jsx @@ -0,0 +1,14 @@ +function Labs() { + return ( + <> +
+

Laboratories

+
+
+ +
+ + ); +} + +export default Labs; \ No newline at end of file diff --git a/src/routes/Main.jsx b/src/routes/Main.jsx new file mode 100644 index 0000000..67d46a2 --- /dev/null +++ b/src/routes/Main.jsx @@ -0,0 +1,14 @@ +function Main() { + return ( + <> +
+

Main page

+
+
+ +
+ + ); +} + +export default Main; \ No newline at end of file diff --git a/src/routes/Projects.jsx b/src/routes/Projects.jsx new file mode 100644 index 0000000..129df2b --- /dev/null +++ b/src/routes/Projects.jsx @@ -0,0 +1,14 @@ +function Projects() { + return ( + <> +
+

Projects

+
+
+ +
+ + ); +} + +export default Projects; \ No newline at end of file