Skip to content

Commit 55290fd

Browse files
committed
refactor: Change help-url/hooks to Typescript
1 parent d7f006c commit 55290fd

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
import { HelpUrls } from './data/api';
12
import { useAllHelpUrls } from './data/apiHooks';
23

3-
const useHelpUrls = (tokenNames) => {
4+
const useHelpUrls = <T extends string[]>(tokenNames: T & (keyof HelpUrls)[]): {
5+
[K in T[number]]?: K extends keyof HelpUrls ? string : null
6+
} => {
47
const {
58
data: pages,
69
} = useAllHelpUrls();

0 commit comments

Comments
 (0)