import { cookies } from 'next/headers';
import { NextResponse } from 'next/server';

export async function POST(request: Request) {
  const cookieStore = await cookies();
  cookieStore.delete('gp_demo_session');

  const url = new URL(request.url);
  const redirectUrl = new URL('/', url.origin);
  return NextResponse.redirect(redirectUrl);
}