Create new screens for existing routes
This commit is contained in:
parent
7994786fd6
commit
31fbc1594d
4 changed files with 15 additions and 1 deletions
|
@ -9,6 +9,8 @@ import {
|
||||||
} from '@mui/icons-material';
|
} from '@mui/icons-material';
|
||||||
import MainDrawer from './components/MainDrawer';
|
import MainDrawer from './components/MainDrawer';
|
||||||
import Home from './screens/Home';
|
import Home from './screens/Home';
|
||||||
|
import Information from './screens/Information';
|
||||||
|
import Calendar from './screens/Calendar';
|
||||||
|
|
||||||
function AuthenticatedApp() {
|
function AuthenticatedApp() {
|
||||||
const { pathname } = useLocation();
|
const { pathname } = useLocation();
|
||||||
|
@ -17,6 +19,8 @@ function AuthenticatedApp() {
|
||||||
<MainDrawer options={menuOptions(pathname)} />
|
<MainDrawer options={menuOptions(pathname)} />
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="/home" element={<Home />} />
|
<Route path="/home" element={<Home />} />
|
||||||
|
<Route path="/info" element={<Information />} />
|
||||||
|
<Route path="/calendar" element={<Calendar />} />
|
||||||
<Route path="/login" element={<Navigate to="/home" />} />
|
<Route path="/login" element={<Navigate to="/home" />} />
|
||||||
</Routes>
|
</Routes>
|
||||||
</>
|
</>
|
||||||
|
|
5
src/screens/Calendar/index.js
Normal file
5
src/screens/Calendar/index.js
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
function Calendar() {
|
||||||
|
return <h1>Calendário Acadêmico</h1>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Calendar;
|
|
@ -6,7 +6,7 @@ function Home() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h2>You're logged in!</h2>
|
<h2>Página inicial</h2>
|
||||||
<button onClick={classrooms}>Get classrooms</button>
|
<button onClick={classrooms}>Get classrooms</button>
|
||||||
{isPending && <h1>Loading...</h1>}
|
{isPending && <h1>Loading...</h1>}
|
||||||
</div>
|
</div>
|
||||||
|
|
5
src/screens/Information/index.js
Normal file
5
src/screens/Information/index.js
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
function Information() {
|
||||||
|
return <h1>Informações</h1>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Information;
|
Loading…
Reference in a new issue