mirror of
https://github.com/TheRealOwenRees/chess-scribe-website.git
synced 2026-07-23 01:46:57 +00:00
18 lines
412 B
TypeScript
18 lines
412 B
TypeScript
import { useEffect } from "react";
|
|
import { useLichess } from "#/hooks/useLichess.ts";
|
|
|
|
interface IProps {
|
|
code: string;
|
|
}
|
|
|
|
export const useLichessCallback = ({ code }: IProps) => {
|
|
const { lichessTokenVerification } = useLichess();
|
|
|
|
useEffect(() => {
|
|
if (!code) return;
|
|
|
|
const response = lichessTokenVerification({ code });
|
|
console.log("Response:", response);
|
|
}, [code, lichessTokenVerification]);
|
|
};
|