"use client";
import axios from "axios";
import { useRouter } from "next/navigation";

export default function Profile() {
	const router = useRouter();

	return (
		<div className="w-full h-full">
			<p>User</p>
			<button
				className="bg-neutral-500"
				onClick={async () => {
					await axios.get("/api/logout");
					router.push("/");
				}}
			>
				Log out
			</button>
		</div>
	);
}
