aboutsummaryrefslogtreecommitdiff
path: root/src/hooks/useNavigate.tsx
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-06-30 01:34:51 +0300
committereug-vs <eug-vs@keemail.me>2020-06-30 01:34:51 +0300
commite170d04d5d2c8c86d2683f3accb4feb2d94c881a (patch)
treec9028ea3ff850774d33cbc510eb19dd0e9f7aade /src/hooks/useNavigate.tsx
parentb31ed66aafbe1d5dbe70d0cdfd70864204510d81 (diff)
downloadwhich-ui-e170d04d5d2c8c86d2683f3accb4feb2d94c881a.tar.gz
style: fix linting errors
Diffstat (limited to 'src/hooks/useNavigate.tsx')
-rw-r--r--src/hooks/useNavigate.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hooks/useNavigate.tsx b/src/hooks/useNavigate.tsx
index 9513f13..befc529 100644
--- a/src/hooks/useNavigate.tsx
+++ b/src/hooks/useNavigate.tsx
@@ -22,7 +22,7 @@ const context = createContext<ContextType>({
const useProvideNavigation = () => {
const [page, setPage] = useState<Page>(landingPage);
- const navigate = (prefix: string, id?: string): void => {
+ const navigate: ContextType['navigate'] = (prefix, id?) => {
setPage({ prefix, id });
};
@@ -35,7 +35,7 @@ export const NavigationProvider: React.FC = ({ children }) => {
return <Provider value={navigation}>{children}</Provider>;
};
-export const useNavigate = () => {
+export const useNavigate = (): ContextType => {
return useContext(context);
};