Pierwszy commit

This commit is contained in:
2024-09-10 21:30:40 +02:00
commit a616741470
31 changed files with 1070 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
import { atom } from 'jotai';
import { pb } from '../lib/pocketbase';
export const authAtom = atom(pb.authStore.isValid);
export const updateAuthAtom = atom(
(get) => get(authAtom),
(_, set) => {
set(authAtom, pb.authStore.isValid);
}
);
// Utworzenie store przy użyciu Jotai
// do przechowywania danych o zalogowanym
// użytkowniku między komponentami.