aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-07-28 03:15:08 +0900
committernsfisis <nsfisis@gmail.com>2024-07-28 03:15:08 +0900
commit569eb3753db04c2ceca8d005b3e1cef15cfe8eb7 (patch)
tree9cb80bf9642e1e7d6146551d81fd57988bb240df /frontend
parentf106dfda762b499af52a741f682c34abb83d27d9 (diff)
downloadiosdc-japan-2024-albatross-569eb3753db04c2ceca8d005b3e1cef15cfe8eb7.tar.gz
iosdc-japan-2024-albatross-569eb3753db04c2ceca8d005b3e1cef15cfe8eb7.tar.zst
iosdc-japan-2024-albatross-569eb3753db04c2ceca8d005b3e1cef15cfe8eb7.zip
rename user's display_username to display_name
Diffstat (limited to 'frontend')
-rw-r--r--frontend/app/.server/api/schema.d.ts2
-rw-r--r--frontend/app/.server/auth.ts4
-rw-r--r--frontend/app/routes/dashboard.tsx6
3 files changed, 6 insertions, 6 deletions
diff --git a/frontend/app/.server/api/schema.d.ts b/frontend/app/.server/api/schema.d.ts
index 815731e..5219ac8 100644
--- a/frontend/app/.server/api/schema.d.ts
+++ b/frontend/app/.server/api/schema.d.ts
@@ -74,7 +74,7 @@ export interface components {
/** @example john */
username: string;
/** @example John Doe */
- display_username: string;
+ display_name: string;
/** @example /images/john.jpg */
icon_path?: string | null;
/** @example false */
diff --git a/frontend/app/.server/auth.ts b/frontend/app/.server/auth.ts
index 9696e90..a3496af 100644
--- a/frontend/app/.server/auth.ts
+++ b/frontend/app/.server/auth.ts
@@ -35,7 +35,7 @@ type JwtPayload = components["schemas"]["JwtPayload"];
export type User = {
userId: number;
username: string;
- displayUsername: string;
+ displayName: string;
iconPath: string | null;
isAdmin: boolean;
};
@@ -126,7 +126,7 @@ export async function isAuthenticated(
return {
userId: payload.user_id,
username: payload.username,
- displayUsername: payload.display_username,
+ displayName: payload.display_name,
iconPath: payload.icon_path ?? null,
isAdmin: payload.is_admin,
};
diff --git a/frontend/app/routes/dashboard.tsx b/frontend/app/routes/dashboard.tsx
index 7fda6d7..907a031 100644
--- a/frontend/app/routes/dashboard.tsx
+++ b/frontend/app/routes/dashboard.tsx
@@ -21,15 +21,15 @@ export default function Dashboard() {
<h2 className="text-2xl font-semibold mb-2">User</h2>
<div className="mb-6">
<ul className="list-disc list-inside">
- <li>Name: {user.displayUsername}</li>
+ <li>Name: {user.displayName}</li>
</ul>
</div>
<h2 className="text-2xl font-semibold mb-2">Team</h2>
<div className="mb-6">
<ul className="list-disc list-inside">
- <li>Name: {user.displayUsername}</li>
+ <li>Name: {user.displayName}</li>
<li>
- Members: {user.displayUsername} ({user.username})
+ Members: {user.displayName} ({user.username})
</li>
</ul>
</div>