fix space indentation

This commit is contained in:
Arif Hasanic
2025-07-25 11:27:09 +02:00
parent b2e9c1f056
commit 53da0f740c
21 changed files with 452 additions and 441 deletions

View File

@@ -4,26 +4,31 @@ import type { FlatasticChore } from "@/types/flatasticChore";
import { devtools } from "zustand/middleware";
interface FlatasticStore {
chores: FlatasticChore[];
fetch: () => Promise<void>;
chores: FlatasticChore[];
fetch: () => Promise<void>;
}
const useFlatasticStore = create(
devtools((set) => ({
chores: [],
fetch: async () => {
if (!import.meta.env.VITE_FLATTASTIC_API_KEY) {
throw new Error("Flatastic API Key is not set");
}
const flatastic = new Flatastic(import.meta.env.VITE_FLATTASTIC_API_KEY);
const data = await flatastic.getTaskList();
devtools(
(set) => ({
chores: [],
fetch: async () => {
if (!import.meta.env.VITE_FLATTASTIC_API_KEY) {
throw new Error("Flatastic API Key is not set");
}
const flatastic = new Flatastic(
import.meta.env.VITE_FLATTASTIC_API_KEY,
);
const data = await flatastic.getTaskList();
console.log("Flatastic chores fetched:", data);
set({ chores: data as FlatasticChore[] });
},
}), {
name: "flatastic-store",
}),
console.log("Flatastic chores fetched:", data);
set({ chores: data as FlatasticChore[] });
},
}),
{
name: "flatastic-store",
},
),
);
export { useFlatasticStore };