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 15:29:20 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
79d7e1a66ab409d19de099f05bf505e430c1ee5f
79d7e1a6
1 parent
676a7ffb
update Router
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
5 deletions
front/src/Routes/Router.js
front/src/Routes/Router.js
View file @
79d7e1a
...
...
@@ -3,21 +3,17 @@ import PropTypes from "prop-types";
import
{
Route
,
Switch
,
Redirect
}
from
"react-router-dom"
;
import
Auth
from
"./Auth/AuthContainer"
;
import
RoomList
from
"./Room/RoomContainer"
;
import
Chat
from
"./Chat/ChatContainer"
;
const
LoggedInRoutes
=
()
=>
(
<
Switch
>
<
Route
exact
path
=
"/"
component
=
{
RoomList
}
/
>
<
Route
exact
path
=
"/:roomname"
component
=
{
Chat
}
/
>
<
Route
path
=
"/:roomname/People"
component
=
{
Chat
}
/
>
<
Route
path
=
"/:roomname/:categoryName"
component
=
{
Chat
}
/
>
<
Redirect
from
=
"*"
to
=
"/"
/>
<
/Switch
>
);
const
LoggedOutRoutes
=
()
=>
(
<
Switch
>
<
Route
exact
path
=
"/"
component
=
{
Auth
}
/
>
<
Route
exact
path
=
"/
Auth
"
component
=
{
Auth
}
/
>
<
Redirect
from
=
"*"
to
=
"/"
/>
<
/Switch
>
);
...
...
Please
register
or
login
to post a comment