Commit 067778dd authored by Jiwon Yoon's avatar Jiwon Yoon
Browse files

app.js

parent 64f4cc1b
...@@ -21,7 +21,7 @@ function App() { ...@@ -21,7 +21,7 @@ function App() {
return ( return (
<div className="" style={{ backgroundColor: "black" }}> <div className="" style={{ backgroundColor: "black" }}>
<AuthProvider> <AuthProvider>
<Router style={{ backgroundColor: "black" }}> <Router>
<SubNav /> <SubNav />
<Header /> <Header />
<MainNav /> <MainNav />
......
...@@ -6,12 +6,10 @@ const SubNav = () => { ...@@ -6,12 +6,10 @@ const SubNav = () => {
return ( return (
<> {(user) ? <> {(user) ?
<nav className="nav justify-content-end py-1"> <nav className="nav justify-content-end py-1">
{(user.role === "member") {(user.role === "member")
? <><Link className="nav-link text-white" to="/mypage">마이페이지</Link> ? <Link className="nav-link text-white" to="/mypage">마이페이지</Link>
</> : <Link className="nav-link text-white" to="/admin">관리자페이지</Link>}
: <Link className="nav-link text-white" to="/admin">관리자페이지</Link>}
<Link className="nav-link text-white" to="/" onClick={logout}>로그아웃 </Link> <Link className="nav-link text-white" to="/" onClick={logout}>로그아웃 </Link>
{/* <a className="nav-link text-white" href="/mypage" onClick={logout}>로그아웃</a> */}
</nav> : </nav> :
<nav className="nav justify-content-end py-1"> <nav className="nav justify-content-end py-1">
<Link className="nav-link text-white" to="/login">로그인</Link> <Link className="nav-link text-white" to="/login">로그인</Link>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment