Skeleton: Use writable store for pbUser object

This commit is contained in:
2025-03-14 23:56:52 +01:00
parent 614e2becc4
commit 43e8a00aeb
13 changed files with 81 additions and 50 deletions

View File

@ -96,7 +96,7 @@
// Database actions
const update_racepick = (create?: boolean): (() => Promise<void>) => {
const handler = async (): Promise<void> => {
if (!pbUser?.id || pbUser.id === "") {
if (!$pbUser?.id || $pbUser.id === "") {
toastStore.trigger(get_error_toast("Invalid user id!"));
return;
}
@ -114,7 +114,7 @@
}
const racepick_data = {
user: pbUser.id,
user: $pbUser.id,
race: data.currentrace.id,
pxx: pxx_select_value,
dnf: dnf_select_value,