diff --git a/packages/backend/src/server/api/routers/account.ts b/packages/backend/src/server/api/routers/account.ts index efb88da..1b5ad44 100644 --- a/packages/backend/src/server/api/routers/account.ts +++ b/packages/backend/src/server/api/routers/account.ts @@ -7,7 +7,6 @@ import { misskeySessionDtoSchema } from '../dto/misskey-session'; import { prisma } from '@/libs/prisma'; import { sessionProcedure } from '@/server/api/procedures/session.js'; import { router } from '@/server/api/trpc.js'; -import { delay } from '@/utils/delay'; export const accountRouter = router({ @@ -19,7 +18,6 @@ export const accountRouter = router({ getMisskeySessions: sessionProcedure .output(z.array(misskeySessionDtoSchema)) .query(async ({ ctx }) => { - await delay(1000); const sessions = await prisma.misskeySession.findMany({ where: { accountId: ctx.account.id }, select: { diff --git a/packages/frontend/src/components/domains/dashboard/def.tsx b/packages/frontend/src/components/domains/dashboard/def.tsx index 780d8a2..2b82f57 100644 --- a/packages/frontend/src/components/domains/dashboard/def.tsx +++ b/packages/frontend/src/components/domains/dashboard/def.tsx @@ -3,6 +3,8 @@ import { useTranslation } from 'react-i18next'; import { WidgetBase } from './WidgetBase'; +import { SuspenseView } from '@/components/primitives/SuspenseView'; + export interface WidgetDef { name: string; iconClass: string; @@ -17,7 +19,9 @@ export const widget = (name: string, iconClass: string, pale: boolean, render: R const { t } = useTranslation(); return ( - {render({})} + + {render({})} + ); }, diff --git a/packages/frontend/src/libs/dayjs.ts b/packages/frontend/src/libs/dayjs.ts index 8fbf9e9..a5b38ee 100644 --- a/packages/frontend/src/libs/dayjs.ts +++ b/packages/frontend/src/libs/dayjs.ts @@ -1,5 +1,5 @@ import dayjs from 'dayjs'; -import 'dayjs/locale/ja'; import relativeTime from 'dayjs/plugin/relativeTime'; +import 'dayjs/locale/ja'; dayjs.extend(relativeTime);