login logic fix
This commit is contained in:
@@ -6,7 +6,6 @@ import { randomBytes } from 'crypto';
|
||||
export async function GET(request: Request) {
|
||||
const session = await auth();
|
||||
if (!session) {
|
||||
console.log(session)
|
||||
return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
|
||||
}
|
||||
try {
|
||||
|
||||
@@ -5,7 +5,6 @@ import NavBar from '@/app/components/NavBar';
|
||||
|
||||
export default function Layout({ children , session}: { children: React.ReactNode , session: any }) {
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
console.log(session);
|
||||
return (
|
||||
<div className="bg-[#F5F5F5] h-full flex flex-row " onClick={() => setIsOpen(false)}>
|
||||
<NavBar isOpen={isOpen} setIsOpen={setIsOpen} user={session?.user} />
|
||||
|
||||
@@ -53,7 +53,6 @@ export default function Page() {
|
||||
const response = await fetch('/api/notice');
|
||||
const data = await response.json();
|
||||
setNoticeList(data);
|
||||
console.log(data);
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user