Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home page #4

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
home
  • Loading branch information
Dmitri Gornakov committed Oct 21, 2024
commit d9e86721edb0ba63f442ed2e6b0f663e4e34c426
15 changes: 15 additions & 0 deletions online-school/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
import './App.css'

import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import Home from './components/Home';
import CourseList from './components/CourseList';
import About from './components/About';
import Contact from './components/Contact';

function App() {
const [count, setCount] = useState(0)

Expand All @@ -28,6 +34,15 @@ function App() {
<p className="read-the-docs">
Click on the Vite and React logos to learn more
</p>

<Router>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/courses" element={<CourseList />} />
<Route path="/about" element={<About />} />
<Route path="/contact" element={<Contact />} />
</Routes>
</Router>
</>
)
}
Expand Down
Empty file removed online-school/src/Home.jsx
Empty file.
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions online-school/src/components/Home.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react';

function Home() {
return (
<div>
<section className="hero">
<h1>Добро пожаловать в онлайн-школу!</h1>
<p>Изучай новые навыки с лучшими преподавателями.</p>
</section>
<section className="courses">
<h2>Популярные курсы</h2>
{/* Здесь будет список популярных курсов */}
</section>
<section className="testimonials">
<h2>Отзывы студентов</h2>
{/* Здесь будут отзывы */}
</section>
</div>
);
}

export default Home;