Skip to content

Commit 8e3694c

Browse files
committed
Minor updates
1 parent 34df5d6 commit 8e3694c

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

sample-oauth-project/web/src/Routes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import { useAuth } from './auth'
1818
const 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" />

sample-oauth-project/web/src/layouts/BlogLayout/BlogLayout.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff 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

sample-oauth-project/web/src/pages/SettingsPage/SettingsPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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}

0 commit comments

Comments
 (0)