File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
sample-oauth-project/web/src Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import { useAuth } from './auth'
1818const Routes = ( ) => {
1919 return (
2020 < Router useAuth = { useAuth } >
21- < Route path = "/settings" page = { SettingsPage } name = "settings" />
2221 < Route path = "/double" page = { DoublePage } name = "double" prerender />
2322 < Route path = "/login" page = { LoginPage } name = "login" />
2423 < Route path = "/signup" page = { SignupPage } name = "signup" />
@@ -40,6 +39,7 @@ const Routes = () => {
4039 < Route path = "/waterfall/{id:Int}" page = { WaterfallPage } prerender name = "waterfall" />
4140 < Private unauthenticated = "login" >
4241 < Route path = "/profile" page = { ProfilePage } name = "profile" />
42+ < Route path = "/settings" page = { SettingsPage } name = "settings" />
4343 </ Private >
4444 < Route path = "/blog-post/{id:Int}" page = { BlogPostPage } name = "blogPost" prerender />
4545 < Route path = "/contact" page = { ContactUsPage } name = "contactUs" />
Original file line number Diff line number Diff line change @@ -46,6 +46,16 @@ const BlogLayout = ({ children }: BlogLayoutProps) => {
4646 Admin
4747 </ Link >
4848 </ li >
49+ { isAuthenticated && (
50+ < li >
51+ < Link
52+ className = "rounded px-4 py-2 transition duration-100 hover:bg-blue-600"
53+ to = { routes . settings ( ) }
54+ >
55+ Settings
56+ </ Link >
57+ </ li >
58+ ) }
4959 { isAuthenticated && (
5060 < li >
5161 < Link
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const SettingsPage = () => {
1212 < >
1313 < MetaTags title = "Settings" description = "Settings page" />
1414
15- < h1 > SettingsPage </ h1 >
15+ < h1 > Settings </ h1 >
1616 < OAuthButtons
1717 action = "link"
1818 getOAuthUrls = { getOAuthUrls }
You can’t perform that action at this time.
0 commit comments