-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3027 from pgentile/add_typescript_support
Add TypeScript support
- Loading branch information
Showing
8 changed files
with
183 additions
and
14 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
File renamed without changes.
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
8 changes: 3 additions & 5 deletions
8
zucchini-ui-frontend/src/useQueryParams.js → zucchini-ui-frontend/src/useQueryParams.ts
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,12 +1,10 @@ | ||
import queryString from "query-string"; | ||
import queryString, { ParsedQuery } from "query-string"; | ||
import { useLocation } from "react-router-dom"; | ||
import { useMemo } from "react"; | ||
|
||
export default function useQueryParams() { | ||
export default function useQueryParams(): ParsedQuery { | ||
const location = useLocation(); | ||
const queryParams = useMemo(() => { | ||
return useMemo(() => { | ||
return queryString.parse(location.search); | ||
}, [location.search]); | ||
|
||
return queryParams; | ||
} |
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,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2015", | ||
"lib": ["ES2015", "dom"], | ||
"jsx": "react-jsx", | ||
"module": "es2020", | ||
"moduleResolution": "bundler" | ||
}, | ||
"include": ["**/*.ts", "**/*.tsx"] | ||
} |
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