Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions src/app/admin/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { supabase } from "@/lib/supabase";
import {
Eye, MessageSquare, Layers, RefreshCcw, TrendingUp,
Folder, Award, Pin, ArrowUpRight, Activity, Sparkles,
Radio, Users,
Radio, Users, ArrowLeft,
} from "lucide-react";
import Link from "next/link";

Expand Down Expand Up @@ -116,13 +116,24 @@ export default function DashboardPage() {
<p className="text-sm text-white/40 mt-1">Welcome back, Admin</p>
</div>

<button
onClick={() => { fetchDashboard(); fetchLive(); }}
className="h-11 px-5 rounded-2xl border border-white/10 bg-white/[0.04] hover:bg-white/[0.08] transition-all flex items-center gap-2 text-sm group w-full sm:w-auto justify-center"
>
<RefreshCcw size={14} className="group-hover:rotate-180 transition duration-500" />
Refresh
</button>
<div className="flex flex-col sm:flex-row gap-3 w-full sm:w-auto">
<Link
href="/"
className="h-11 px-5 rounded-2xl border border-white/10 bg-white/[0.04] hover:bg-white/[0.08] transition-all flex items-center gap-2 text-sm group justify-center"
>
<ArrowLeft size={14} className="group-hover:-translate-x-1 transition-transform" />
Back to Portfolio
</Link>

<button
type="button"
onClick={() => { fetchDashboard(); fetchLive(); }}
className="h-11 px-5 rounded-2xl border border-white/10 bg-white/[0.04] hover:bg-white/[0.08] transition-all flex items-center gap-2 text-sm group justify-center"
>
<RefreshCcw size={14} className="group-hover:rotate-180 transition duration-500" />
Refresh
</button>
</div>
</div>

{/* LIVE VIEWERS BANNER */}
Expand Down
9 changes: 7 additions & 2 deletions src/lib/siteSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const defaultSiteSettings: SiteSettings = {
about_description:
'Fresh graduate of SMK Software Engineering class of 2026 with a passion for front-end development and modern UI. Focused on creating clean, responsive, and user-friendly websites.',
about_quote: 'Turning ideas into clean, modern, and meaningful digital experiences.',
cv_url: '',
cv_url: 'https://docs.google.com/document/d/1_sE5voLX8rwKd5RMgYDXb2sWllVlw4vlVPZIlEXoDH4/edit?usp=drive_link',
github_url: 'https://github.com/Dev-Sahad',
linkedin_url: 'https://www.linkedin.com/in/muhammad-sahad-78b827352',
instagram_url: 'https://www.instagram.com/sahad_____sha/',
Expand All @@ -43,8 +43,13 @@ export const defaultSiteSettings: SiteSettings = {
}

export function mergeSiteSettings(settings?: Partial<SiteSettings> | null): SiteSettings {
return {
const mergedSettings = {
...defaultSiteSettings,
...(settings || {}),
}

return {
...mergedSettings,
cv_url: mergedSettings.cv_url?.trim() || defaultSiteSettings.cv_url,
}
}