mirror of
https://github.com/TheRealOwenRees/chess-scribe-website.git
synced 2026-07-23 01:46:57 +00:00
check callback from lichess server
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
import { z } from "zod";
|
||||
import Callback from "#/pages/Callback.tsx";
|
||||
|
||||
const callbackSchema = z.object({
|
||||
code: z.string(),
|
||||
state: z.string(),
|
||||
});
|
||||
|
||||
// type CallbackProps = z.infer<typeof callbackSchema>;
|
||||
|
||||
export const Route = createFileRoute("/callback")({
|
||||
validateSearch: (search) => callbackSchema.parse(search),
|
||||
component: RouteComponent,
|
||||
});
|
||||
|
||||
function RouteComponent() {
|
||||
return <Callback />;
|
||||
}
|
||||
Reference in New Issue
Block a user