49 lines
1.3 KiB
TypeScript
49 lines
1.3 KiB
TypeScript
import { cookies } from "next/dist/client/components/headers";
|
|
import styles from "../page.module.css";
|
|
|
|
export default function Page() {
|
|
const cookieStore = cookies();
|
|
const ticket = cookieStore.get("ticket");
|
|
if (ticket === null) {
|
|
return <div>Ticket is null?</div>;
|
|
}
|
|
|
|
return (
|
|
<main className={styles.main}>
|
|
<form action="/api/register" method="post" className={styles.form}>
|
|
<div>
|
|
<label htmlFor="username">Username</label>
|
|
<input type="text" id="username" placeholder="julian" />
|
|
</div>
|
|
|
|
<div>
|
|
<label htmlFor="display-name">Display name</label>
|
|
<input type="text" id="display-name" placeholder="NotNite" />
|
|
</div>
|
|
|
|
<div>
|
|
<label htmlFor="email">Email</label>
|
|
<input type="text" id="email" placeholder="hi@notnite.com" />
|
|
</div>
|
|
|
|
<div>
|
|
<label htmlFor="password">Password</label>
|
|
<input type="password" id="password" placeholder="deeznuts47" />
|
|
</div>
|
|
|
|
<div>
|
|
<label htmlFor="avatar">Avatar</label>
|
|
<input
|
|
type="file"
|
|
id="avatar"
|
|
name="avatar"
|
|
accept="image/png, image/jpeg"
|
|
/>
|
|
</div>
|
|
|
|
<button>Submit</button>
|
|
</form>
|
|
</main>
|
|
);
|
|
}
|