Files
buzz/app/(ui)/admin/settings/page.tsx
T
dmgnr 6b64059501
Build and Push Image / build-backend (push) Successful in 1m1s
Build and Push Image / push (push) Has been cancelled
Build and Push Image / build-frontend (push) Has been cancelled
feat(don): add method toggle
2026-07-19 02:58:44 +07:00

58 lines
1.6 KiB
TypeScript
Executable File

import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { cn } from "@/lib/utils";
import { SettingsAccountSection } from "./account";
import { getSettongs } from "./api";
import { SettingsServicesSection } from "./services";
export default async function () {
const { enka, donatePromptpay, donateTruemoney } = await getSettongs();
return (
<div className="grid h-full w-full gap-8 p-2 pl-0">
<Tabs defaultValue="external">
<TabsList className="w-full">
<TabsTrigger value="external">บริการนอก</TabsTrigger>
<TabsTrigger value="account">บัญชี</TabsTrigger>
</TabsList>
<TabsContent value="external">
<SettingsServicesSection
enka={enka}
donPp={donatePromptpay}
donTmn={donateTruemoney}
/>
</TabsContent>
<TabsContent value="account">
<SettingsAccountSection />
</TabsContent>
</Tabs>
</div>
);
}
export function Section({
title,
description,
children,
className,
...props
}: React.ComponentProps<"div"> & { description?: string }) {
return (
<Card className={cn("h-full", className)} {...props}>
<CardHeader>
{title && <CardTitle className="text-2xl">{title}</CardTitle>}
{description && <CardDescription>{description}</CardDescription>}
</CardHeader>
<CardContent className="h-full">{children}</CardContent>
</Card>
);
}
export const dynamic = "force-dynamic";