mirror of
https://github.com/OwethuManagedServices/oms-website-nextjs.git
synced 2025-12-17 19:08:09 +00:00
shwo active page
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user