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 (