mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-06-29 15:47:09 +00:00
Update package.json for turbopack support, enhance AppSidebar with new icons, and add Textarea and auth-utils components
- Modified the dev script in package.json to use turbopack for improved development performance. - Enhanced AppSidebar by adding new icons for navigation items, improving visual clarity. - Introduced a new Textarea component for consistent styling and functionality across forms. - Added auth-utils module to fetch the current user session, streamlining user authentication processes.
This commit is contained in:
10
lib/auth-utils.ts
Normal file
10
lib/auth-utils.ts
Normal file
@ -0,0 +1,10 @@
|
||||
"use server";
|
||||
import { headers } from "next/headers";
|
||||
import { auth } from "./auth";
|
||||
|
||||
export async function getCurrentUser() {
|
||||
const session = await auth.api.getSession({
|
||||
headers: await headers(),
|
||||
});
|
||||
return session?.user;
|
||||
}
|
Reference in New Issue
Block a user