add Login view
This commit is contained in:
parent
03a8e84e63
commit
468951d9bb
@ -8,6 +8,7 @@ import Coordinator from './views/coordinator/Coordinator'
|
||||
import Groups from './views/coordinator/Groups'
|
||||
import Leaders from './views/coordinator/Leaders'
|
||||
import Students from './views/coordinator/Students'
|
||||
import Login from './views/Login'
|
||||
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
@ -22,7 +23,8 @@ function App() {
|
||||
<div>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<Routes>
|
||||
<Route index element={<Coordinator />} />
|
||||
<Route index element={<Login />} />
|
||||
<Route path="" element={<Login />} />
|
||||
<Route path="coordinator" element={<Coordinator />}>
|
||||
<Route path="groups" element={<Groups />} />
|
||||
<Route path="students" element={<Students />} />
|
||||
|
47
frontend/src/views/Login.tsx
Normal file
47
frontend/src/views/Login.tsx
Normal file
@ -0,0 +1,47 @@
|
||||
import { useEffect } from 'react'
|
||||
import { Outlet, useNavigate } from 'react-router-dom'
|
||||
import { NavLink } from 'react-router-dom'
|
||||
|
||||
const Login = () => {
|
||||
const navigate = useNavigate()
|
||||
|
||||
// useEffect(() => {
|
||||
// navigate('/coordinator/students')
|
||||
// // eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
// }, [])
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="flex items-center bg-gray-300 mt-20 py-6 px-10 shadow">
|
||||
<h1 className="text-xl font-bold mx-auto">System PRI</h1>
|
||||
</div>
|
||||
<div className="w-full lg:w-1/4 flex flex-col mx-auto mt-20 px-10 py-5 bg-gray-300 rounded-lg shadow">
|
||||
<div className="form-control">
|
||||
<label className="label" htmlFor="login">
|
||||
Login
|
||||
</label>
|
||||
<input
|
||||
className="input input-bordered"
|
||||
id="login"
|
||||
type="text"
|
||||
/>
|
||||
</div>
|
||||
<div className="form-control">
|
||||
<label className="label" htmlFor="password">
|
||||
Hasło
|
||||
</label>
|
||||
<input
|
||||
className="input input-bordered"
|
||||
id="password"
|
||||
type="text"
|
||||
/>
|
||||
</div>
|
||||
<span onClick={() => navigate('/coordinator/students')} className="cursor-pointer">Koordynator</span>
|
||||
<span>Opiekun</span>
|
||||
<span>Student</span>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default Login
|
Loading…
Reference in New Issue
Block a user