From 7ec47b409855d93f11a31655047064cf50c3017b Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 14 Nov 2023 16:04:48 +0900 Subject: [PATCH] Fix user page --- .../(navfooter)/settings/account/ProfileSection.tsx | 4 ++-- frontend/src/components/UserAvatarList.module.scss | 6 ------ frontend/src/components/UserAvatarList.tsx | 11 ----------- frontend/src/lib/api/urls.ts | 6 +++++- 4 files changed, 7 insertions(+), 20 deletions(-) delete mode 100644 frontend/src/components/UserAvatarList.module.scss delete mode 100644 frontend/src/components/UserAvatarList.tsx diff --git a/frontend/src/app/(navfooter)/settings/account/ProfileSection.tsx b/frontend/src/app/(navfooter)/settings/account/ProfileSection.tsx index a8547202a..fcb414078 100644 --- a/frontend/src/app/(navfooter)/settings/account/ProfileSection.tsx +++ b/frontend/src/app/(navfooter)/settings/account/ProfileSection.tsx @@ -5,7 +5,7 @@ import { LinkExternalIcon } from "@primer/octicons-react" import Button from "@/components/Button" import GhostButton from "@/components/GhostButton" import { useThisUser, isAnonUser } from "@/lib/api" -import { userUrl } from "@/lib/api/urls" +import { userHtmlUrl } from "@/lib/api/urls" import Section from "../Section" @@ -26,7 +26,7 @@ export default function ProfileSection() { Edit on GitHub - View decomp.me profile + View decomp.me profile } diff --git a/frontend/src/components/UserAvatarList.module.scss b/frontend/src/components/UserAvatarList.module.scss deleted file mode 100644 index 57631e81c..000000000 --- a/frontend/src/components/UserAvatarList.module.scss +++ /dev/null @@ -1,6 +0,0 @@ -.list { - list-style: none; - - display: inline-flex; - gap: 0.2em; -} diff --git a/frontend/src/components/UserAvatarList.tsx b/frontend/src/components/UserAvatarList.tsx deleted file mode 100644 index f32886596..000000000 --- a/frontend/src/components/UserAvatarList.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import * as api from "@/lib/api" -import { userUrl } from "@/lib/api/urls" - -import UserLink from "./user/UserLink" -import styles from "./UserAvatarList.module.scss" - -export default function UserAvatarList({ users }: { users: api.User[] }) { - return -} diff --git a/frontend/src/lib/api/urls.ts b/frontend/src/lib/api/urls.ts index a8fa18b54..dc1e6d6d1 100644 --- a/frontend/src/lib/api/urls.ts +++ b/frontend/src/lib/api/urls.ts @@ -1,9 +1,13 @@ import { Preset, Project, ProjectMember, TerseScratch, User } from "./types" -export function userUrl(user: User): string { +export function userHtmlUrl(user: User): string { return `/u/${user.username}` } +export function userUrl(user: User): string { + return `/users/${user.username}` +} + export function presetUrl(preset: Preset): string { return `/preset/${preset.id}` }