Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
sdy
2020-07-17 16:16:20 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
02933885714b1b5f8d9833bf7e71417bced20109
02933885
1 parent
c9dfaef4
add routes
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
front/src/Routes/Router.js
front/src/Routes/Router.js
View file @
0293388
import
React
from
"react"
;
import
PropTypes
from
"prop-types"
;
import
{
Route
,
Switch
,
Redirect
}
from
"react-router-dom"
;
import
{
Route
,
Switch
}
from
"react-router-dom"
;
import
Auth
from
"./Auth/AuthContainer"
;
import
RoomList
from
"./Room/RoomContainer"
;
import
Main
from
"./Main/MainPresenter"
;
const
LoggedInRoutes
=
()
=>
(
<
Switch
>
<
Route
exact
path
=
"/"
component
=
{
RoomList
}
/
>
<
Redirect
from
=
"*"
to
=
"/"
/>
<
Route
exact
path
=
"/room-list"
component
=
{
RoomList
}
/
>
<
/Switch
>
);
const
LoggedOutRoutes
=
()
=>
(
<
Switch
>
<
Route
exact
path
=
"/Auth"
component
=
{
Auth
}
/
>
<
Redirect
from
=
"*"
to
=
"/"
/>
<
Route
exact
path
=
"/auth"
component
=
{
Auth
}
/
>
<
Route
exact
path
=
"/about"
component
=
{
Main
}
/
>
<
Route
exact
path
=
"/features"
component
=
{
Main
}
/
>
<
Route
exact
path
=
"/support"
component
=
{
Main
}
/
>
<
/Switch
>
);
...
...
Please
register
or
login
to post a comment