style: clean up code with prettier and eslint
This commit is contained in:
1 parent
60278b9e71
commit
fb8e77bb68
378 files changed
+22407
-20689
No files matched your search
@@ -1,31 +1,31 @@
|
||||
import Link from 'next/link'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { fetchAdminList } from '@/lib/admin-list'
|
||||
import { PERMS } from '@/lib/permissions'
|
||||
import { PollsTable } from './polls-table'
|
||||
import Link from "next/link";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { fetchAdminList } from "@/lib/admin-list";
|
||||
import { PERMS } from "@/lib/permissions";
|
||||
import { PollsTable } from "./polls-table";
|
||||
|
||||
export default async function PollsPage({
|
||||
params: paramsPromise,
|
||||
searchParams,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
searchParams: Promise<Record<string, string>>
|
||||
params: Promise<{ locale: string }>;
|
||||
searchParams: Promise<Record<string, string>>;
|
||||
}) {
|
||||
const result = await fetchAdminList(
|
||||
{
|
||||
permission: PERMS.POLLS_VIEW,
|
||||
model: 'websitePoll',
|
||||
searchFields: ['title'],
|
||||
defaultSort: { createdAt: 'desc' },
|
||||
model: "websitePoll",
|
||||
searchFields: ["title"],
|
||||
defaultSort: { createdAt: "desc" },
|
||||
mapRow: (p: {
|
||||
id: number
|
||||
title: string
|
||||
status: string
|
||||
showResults: number
|
||||
multipleChoice: number
|
||||
startsAt: Date | null
|
||||
endsAt: Date | null
|
||||
createdAt: Date
|
||||
id: number;
|
||||
title: string;
|
||||
status: string;
|
||||
showResults: number;
|
||||
multipleChoice: number;
|
||||
startsAt: Date | null;
|
||||
endsAt: Date | null;
|
||||
createdAt: Date;
|
||||
}) => ({
|
||||
id: p.id,
|
||||
title: p.title,
|
||||
@@ -39,7 +39,7 @@ export default async function PollsPage({
|
||||
},
|
||||
paramsPromise,
|
||||
searchParams,
|
||||
)
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
@@ -63,5 +63,5 @@ export default async function PollsPage({
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user