how to use getServerSession inside onclick server action
I am trying to call getServerSession inside onClick and it's not working can anyone have answer to this how can we call getServerSession inside server action which is used inside onClick
export default function Page() {
return <div onClick={() => Example()}>hello</div>;
}export async function Example() {
const session = await getServerSession(authOption);
console.log(session);
}