basic loading of user's studies

This commit is contained in:
2026-06-09 10:31:59 +02:00
parent 0b1a0e6457
commit 7b2bf3161b
7 changed files with 111 additions and 16 deletions
+2 -2
View File
@@ -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 = () => {
+5
View File
@@ -0,0 +1,5 @@
const LichessStudyUrlInput = () => {
return <input placeholder="Lichess Study URL" className="" />;
};
export default LichessStudyUrlInput;
+21
View File
@@ -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;