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

@@ -10,7 +10,8 @@
},
"formatter": {
"enabled": true,
"indentStyle": "tab"
"indentStyle": "space",
"indentWidth": 4
},
"linter": {
"enabled": true,

View File

@@ -37,7 +37,9 @@ class Flatastic {
}
getTaskList() {
return this.request("https://api.flatastic-app.com/index.php/api/chores");
return this.request(
"https://api.flatastic-app.com/index.php/api/chores",
);
}
getInformation() {

View File

@@ -28,8 +28,8 @@ export default function Flatastic() {
<ul>
{chores.map((chore: FlatasticChore) => (
<li key={chore.id} style={{ textAlign: "left" }}>
{idToNameMap[chore.currentUser]}: {chore.title} - Points:{" "}
{chore.points}
{idToNameMap[chore.currentUser]}: {chore.title} -
Points: {chore.points}
</li>
))}
</ul>

View File

@@ -9,21 +9,26 @@ interface FlatasticStore {
}
const useFlatasticStore = create(
devtools((set) => ({
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 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",
}),
{
name: "flatastic-store",
},
),
);
export { useFlatasticStore };

View File

@@ -4,7 +4,8 @@ import type { DepartureType } from "@/types/departureType";
import { devtools } from "zustand/middleware";
const useKVVStore = create(
devtools((set) => ({
devtools(
(set) => ({
pStreet: [] as DepartureType[],
hStreet: [] as DepartureType[],
fetch: async () => {
@@ -25,9 +26,11 @@ const useKVVStore = create(
pStreet: pStreetJson as DepartureType[],
});
},
}), {
name: "kvv-store",
}),
{
name: "kvv-store",
},
),
);
export { useKVVStore };