From 5043c8dda39e0cd109cbb989abbdec8c8f55c408 Mon Sep 17 00:00:00 2001 From: sk1982 Date: Fri, 15 Mar 2024 19:01:53 -0400 Subject: [PATCH] chuni: fix nameplate cutting off to much --- src/actions/chuni/profile.ts | 2 ++ src/components/chuni/nameplate.tsx | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/actions/chuni/profile.ts b/src/actions/chuni/profile.ts index 3be4424..d7af5f3 100644 --- a/src/actions/chuni/profile.ts +++ b/src/actions/chuni/profile.ts @@ -62,6 +62,8 @@ export async function getUserData(user: UserPayload) { return res; } +export type ChuniUserData = Awaited>; + export async function getUserRating(user: UserPayload) { const recent = await db.selectFrom('chuni_profile_recent_rating as recent') .where('user', '=', user.id) diff --git a/src/components/chuni/nameplate.tsx b/src/components/chuni/nameplate.tsx index 7f5ac4e..71a1566 100644 --- a/src/components/chuni/nameplate.tsx +++ b/src/components/chuni/nameplate.tsx @@ -1,11 +1,11 @@ -import { getUserData } from '@/actions/chuni/profile'; +import { ChuniUserData } from '@/actions/chuni/profile'; import { getImageUrl } from '@/helpers/assets'; import { ChuniTrophy } from '@/components/chuni/trophy'; import { PickNullable } from '@/types/pick-nullable'; import { ChuniRating } from '@/components/chuni/rating'; import { formatJst } from '@/helpers/format-jst'; -export type Profile = PickNullable>, +export type Profile = PickNullable; export type ChuniNameplateProps = { @@ -16,7 +16,7 @@ export type ChuniNameplateProps = { export const ChuniNameplate = ({ className, profile }: ChuniNameplateProps) => { if (!profile) return null; - return (
+ return (