refactor: remove login/auth for public dashboard
Deploy to VPS / deploy (push) Failing after 34s

- Remove login page, redirect / to /dashboard directly
- Remove AuthProvider, DashboardGuard from dashboard layout
- Remove use-auth hook and auth API module
- Remove X-Admin-Password header from API client
- Remove logout button from sidebar
This commit is contained in:
asepharyana
2026-07-26 11:30:27 +07:00
parent 5e01ec0806
commit f9f1313ccd
7 changed files with 17 additions and 258 deletions
@@ -1,8 +1,7 @@
"use client";
import { LayoutDashboard, LogOut, MessageSquare, Radio } from "lucide-react";
import { LayoutDashboard, MessageSquare, Radio } from "lucide-react";
import { useRouter } from "next/navigation";
import { useAuth } from "@/lib/hooks/use-auth";
const tabs = [
{ id: "messages", label: "Messages", icon: MessageSquare },
@@ -13,7 +12,6 @@ const tabs = [
type TabId = (typeof tabs)[number]["id"];
export function Sidebar({ activeTab }: { activeTab: TabId }) {
const { logout } = useAuth();
const router = useRouter();
const handleTabClick = (tabId: TabId) => {
@@ -43,17 +41,6 @@ export function Sidebar({ activeTab }: { activeTab: TabId }) {
</button>
))}
</nav>
<div className="border-t p-3">
<button
type="button"
onClick={logout}
className="w-full flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground transition-colors"
>
<LogOut className="size-4 shrink-0" />
Sign out
</button>
</div>
</aside>
);
}