調整
This commit is contained in:
parent
d9a9072bd0
commit
34b4507e14
@ -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: {
|
||||
|
@ -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 (
|
||||
<WidgetBase title={pale ? undefined : (t('_widgets.' + name) ?? '')} iconClass={pale ? undefined : iconClass} pale={pale}>
|
||||
{render({})}
|
||||
<SuspenseView>
|
||||
{render({})}
|
||||
</SuspenseView>
|
||||
</WidgetBase>
|
||||
);
|
||||
},
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user