import { auth } from "@/auth";

export const getCurrent = async () => {
  try {
    const session = await auth();
    
    if (!session?.user) {
      return null;
    }
    
    return session.user;
  } catch (error) {
    console.error("Error fetching current user:", error);
    return null;
  }
};
