hata düzeltme 1
This commit is contained in:
@@ -129,7 +129,7 @@ export default async function DashboardPage() {
|
||||
)
|
||||
}
|
||||
|
||||
function PlusIcon(props: any) {
|
||||
function PlusIcon(props: React.SVGProps<SVGSVGElement>) {
|
||||
return (
|
||||
<svg
|
||||
{...props}
|
||||
|
||||
@@ -1,44 +1,28 @@
|
||||
import { createClient } from "@/lib/supabase-server"
|
||||
import { SiteSettingsForm } from "@/components/dashboard/site-settings-form"
|
||||
import { AppearanceForm } from "@/components/dashboard/appearance-form"
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { SettingsTabs } from "@/components/dashboard/settings-tabs"
|
||||
import { getSmsSettings } from "@/lib/sms/actions"
|
||||
|
||||
export default async function SettingsPage() {
|
||||
const supabase = createClient()
|
||||
|
||||
// Fetch site settings
|
||||
const { data: settings } = await supabase
|
||||
const { data: siteSettings } = await supabase
|
||||
.from('site_settings')
|
||||
.select('*')
|
||||
.single()
|
||||
|
||||
// Fetch SMS settings (server-side call to our action/db)
|
||||
// Note: getSmsSettings is an action that checks for admin, which is fine.
|
||||
// However, since we are in a server component with a Supabase client, we could also fetch directly if we had admin client.
|
||||
// But let's use the clean action or direct logic.
|
||||
// Actually, calling server action from server component is fine, but we need to handle the return structure.
|
||||
const smsResponse = await getSmsSettings()
|
||||
const smsSettings = smsResponse.data || null
|
||||
|
||||
return (
|
||||
<div className="flex-1 space-y-4 p-8 pt-6">
|
||||
<h2 className="text-3xl font-bold tracking-tight">Ayarlar</h2>
|
||||
|
||||
{/* Site General Settings */}
|
||||
<div className="grid gap-4">
|
||||
<SiteSettingsForm initialData={settings} />
|
||||
</div>
|
||||
|
||||
<div className="grid gap-4 grid-cols-1 md:grid-cols-2">
|
||||
<AppearanceForm />
|
||||
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>Hesap Güvenliği</CardTitle>
|
||||
<CardDescription>
|
||||
Şifre ve oturum yönetimi.
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-4">
|
||||
<Button variant="outline" className="w-full">Şifre Değiştir</Button>
|
||||
<Button variant="destructive" className="w-full">Hesabı Sil</Button>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
<SettingsTabs siteSettings={siteSettings} smsSettings={smsSettings} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user