nextjs-rewrite (#5)

Reviewed-on: #5
Co-authored-by: David Gwilliam <dhgwilliam@gmail.com>
Co-committed-by: David Gwilliam <dhgwilliam@gmail.com>
This commit was merged in pull request #5.
This commit is contained in:
2026-03-30 02:30:13 +00:00
committed by david
parent 1a9b3496e1
commit 123df671f5
160 changed files with 19293 additions and 1180 deletions
+32
View File
@@ -0,0 +1,32 @@
'use client';
import { authClient } from '@/lib/auth-client';
import { useEffect, useState } from 'react';
export default function TestApi() {
const [result, setResult] = useState<any>(null);
const [error, setError] = useState<string | null>(null);
useEffect(() => {
async function test() {
try {
const response = await authClient.signIn.email({
email: 'david@dhg.lol',
password: 'admin1234'
});
setResult(response);
} catch (err: any) {
setError(err.message);
}
}
test();
}, []);
return (
<div style={{ padding: '2rem' }}>
<h1>Test Auth API</h1>
{error && <p style={{ color: 'red' }}>Error: {error}</p>}
{result && <pre>{JSON.stringify(result, null, 2)}</pre>}
{!result && !error && <p>Loading...</p>}
</div>
);
}