-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add prettier; - format code using prettier; - change github workflow and pre-commit to run prettier Closes #74
- Loading branch information
1 parent
25be3fb
commit 45bef75
Showing
20 changed files
with
357 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/usr/bin/env sh | ||
cd dashboard && pnpm lint | ||
cd dashboard && pnpm lint-staged | ||
pnpm pycommit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"printWidth": 80, | ||
"trailingComma": "all", | ||
"tabWidth": 2, | ||
"semi": true, | ||
"bracketSpacing": true, | ||
"singleQuote": true, | ||
"arrowParens": "avoid" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import { useQuery, UseQueryResult} from "@tanstack/react-query"; | ||
import { useQuery, UseQueryResult } from '@tanstack/react-query'; | ||
|
||
import type { Tree } from "../types/tree/Tree"; | ||
import type { Tree } from '../types/tree/Tree'; | ||
|
||
const fetchTreeCheckoutData = async(): Promise<Tree[]> => { | ||
const res = await fetch('/api/tree'); | ||
if (!res.ok) { | ||
throw new Error('Request to /api/tree response was not ok'); | ||
} | ||
return res.json(); | ||
} | ||
const fetchTreeCheckoutData = async (): Promise<Tree[]> => { | ||
const res = await fetch('/api/tree'); | ||
if (!res.ok) { | ||
throw new Error('Request to /api/tree response was not ok'); | ||
} | ||
return res.json(); | ||
}; | ||
|
||
export const useTreeTable = (): UseQueryResult => { | ||
return useQuery({ queryKey: ['treeData'], queryFn: fetchTreeCheckoutData }); | ||
} | ||
return useQuery({ queryKey: ['treeData'], queryFn: fetchTreeCheckoutData }); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.