good forst commit

This commit is contained in:
2026-06-09 02:02:40 +05:30
parent 801c1d7121
commit 249d759e6a
215 changed files with 15425 additions and 1240 deletions
@@ -0,0 +1,24 @@
'use client';
import { useRouter } from 'next/navigation';
import { useState, useTransition } from 'react';
export function MemberLogoutButton() {
const router = useRouter();
const [pending, startTransition] = useTransition();
return (
<button
type="button"
disabled={pending}
onClick={() =>
startTransition(async () => {
await fetch('/api/my/logout', { method: 'POST' });
router.replace('/');
})
}
className="rounded border border-gray-300 px-3 py-1.5 text-sm hover:bg-gray-50 disabled:opacity-50"
>
{pending ? 'Signing out…' : 'Sign out'}
</button>
);
}