mirror of
https://github.com/TheRealOwenRees/chess-scribe-website.git
synced 2026-07-23 01:46:57 +00:00
basic loading of user's studies
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { useLichessUser } from "#/context/LichessUserContext.tsx";
|
||||
import { useLichessOAuth } from "#/hooks/useLichessOAuth.ts";
|
||||
import { useLichess } from "#/hooks/useLichess.ts";
|
||||
|
||||
const LichessButton = () => {
|
||||
const { lichessLogin, lichessLogout } = useLichessOAuth();
|
||||
const { lichessLogin, lichessLogout } = useLichess();
|
||||
const { user } = useLichessUser();
|
||||
|
||||
const onClickHandler = () => {
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
const LichessStudyUrlInput = () => {
|
||||
return <input placeholder="Lichess Study URL" className="" />;
|
||||
};
|
||||
|
||||
export default LichessStudyUrlInput;
|
||||
@@ -0,0 +1,21 @@
|
||||
import { useLichess } from "#/hooks/useLichess.ts";
|
||||
|
||||
const SelectLichessStudy = () => {
|
||||
const { getLichessUserStudies } = useLichess();
|
||||
|
||||
const onClickHandler = async () => {
|
||||
await getLichessUserStudies();
|
||||
};
|
||||
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-secondary"
|
||||
onClick={onClickHandler}
|
||||
>
|
||||
Select Lichess Study
|
||||
</button>
|
||||
);
|
||||
};
|
||||
|
||||
export default SelectLichessStudy;
|
||||
Reference in New Issue
Block a user