fix space indentation
This commit is contained in:
@@ -10,7 +10,8 @@
|
|||||||
},
|
},
|
||||||
"formatter": {
|
"formatter": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"indentStyle": "tab"
|
"indentStyle": "space",
|
||||||
|
"indentWidth": 4
|
||||||
},
|
},
|
||||||
"linter": {
|
"linter": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
|
|||||||
@@ -37,7 +37,9 @@ class Flatastic {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getTaskList() {
|
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() {
|
getInformation() {
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ export default function Flatastic() {
|
|||||||
<ul>
|
<ul>
|
||||||
{chores.map((chore: FlatasticChore) => (
|
{chores.map((chore: FlatasticChore) => (
|
||||||
<li key={chore.id} style={{ textAlign: "left" }}>
|
<li key={chore.id} style={{ textAlign: "left" }}>
|
||||||
{idToNameMap[chore.currentUser]}: {chore.title} - Points:{" "}
|
{idToNameMap[chore.currentUser]}: {chore.title} -
|
||||||
{chore.points}
|
Points: {chore.points}
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -9,21 +9,26 @@ interface FlatasticStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const useFlatasticStore = create(
|
const useFlatasticStore = create(
|
||||||
devtools((set) => ({
|
devtools(
|
||||||
|
(set) => ({
|
||||||
chores: [],
|
chores: [],
|
||||||
fetch: async () => {
|
fetch: async () => {
|
||||||
if (!import.meta.env.VITE_FLATTASTIC_API_KEY) {
|
if (!import.meta.env.VITE_FLATTASTIC_API_KEY) {
|
||||||
throw new Error("Flatastic API Key is not set");
|
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();
|
const data = await flatastic.getTaskList();
|
||||||
|
|
||||||
console.log("Flatastic chores fetched:", data);
|
console.log("Flatastic chores fetched:", data);
|
||||||
set({ chores: data as FlatasticChore[] });
|
set({ chores: data as FlatasticChore[] });
|
||||||
},
|
},
|
||||||
}), {
|
|
||||||
name: "flatastic-store",
|
|
||||||
}),
|
}),
|
||||||
|
{
|
||||||
|
name: "flatastic-store",
|
||||||
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
export { useFlatasticStore };
|
export { useFlatasticStore };
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ import type { DepartureType } from "@/types/departureType";
|
|||||||
import { devtools } from "zustand/middleware";
|
import { devtools } from "zustand/middleware";
|
||||||
|
|
||||||
const useKVVStore = create(
|
const useKVVStore = create(
|
||||||
devtools((set) => ({
|
devtools(
|
||||||
|
(set) => ({
|
||||||
pStreet: [] as DepartureType[],
|
pStreet: [] as DepartureType[],
|
||||||
hStreet: [] as DepartureType[],
|
hStreet: [] as DepartureType[],
|
||||||
fetch: async () => {
|
fetch: async () => {
|
||||||
@@ -25,9 +26,11 @@ const useKVVStore = create(
|
|||||||
pStreet: pStreetJson as DepartureType[],
|
pStreet: pStreetJson as DepartureType[],
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
}), {
|
|
||||||
name: "kvv-store",
|
|
||||||
}),
|
}),
|
||||||
|
{
|
||||||
|
name: "kvv-store",
|
||||||
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
export { useKVVStore };
|
export { useKVVStore };
|
||||||
|
|||||||
Reference in New Issue
Block a user