fix space indentation
This commit is contained in:
@@ -10,7 +10,8 @@
|
||||
},
|
||||
"formatter": {
|
||||
"enabled": true,
|
||||
"indentStyle": "tab"
|
||||
"indentStyle": "space",
|
||||
"indentWidth": 4
|
||||
},
|
||||
"linter": {
|
||||
"enabled": true,
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 };
|
||||
|
||||
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user