shwo active page

This commit is contained in:
libertyoms
2025-05-18 09:39:57 +02:00
parent e2347ecc87
commit ec3f4a51dc
3 changed files with 282 additions and 174 deletions

View File

@ -1,22 +1,13 @@
// components/Header.tsx (Server Component)
import React from "react";
import { auth } from "@/auth"; // Only need auth (for session) from here now
import HeaderClient from "./HeaderClient";
import { handleSignInAction, handleSignOutAction } from "@/actions/auth-action";
const Header = async () => {
// Fetch session data on the server
const session = await auth();
// Pass the session data and YOUR Server Actions as props
return (
<HeaderClient
session={session}
handleSignIn={handleSignInAction} // Pass YOUR sign-in Server Action
handleSignOut={handleSignOutAction} // Pass YOUR sign-out Server Action
/>
);
return <HeaderClient />;
};
export default Header;