Skip to content

Commit

Permalink
fix: fix useDrawerStatus typings (react-navigation#10163)
Browse files Browse the repository at this point in the history
  • Loading branch information
elrony authored and MohamedLamineAllal committed Feb 4, 2022
1 parent 10ec169 commit f9ae6bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/drawer/src/utils/useDrawerStatus.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { DrawerStatus } from '@react-navigation/native';
import * as React from 'react';

import DrawerStatusContext from './DrawerStatusContext';
Expand All @@ -6,7 +7,7 @@ import DrawerStatusContext from './DrawerStatusContext';
* Hook to detect if the drawer's status in a parent navigator.
* Returns 'open' if the drawer is open, 'closed' if the drawer is closed.
*/
export default function useDrawerStatus() {
export default function useDrawerStatus(): DrawerStatus {
const drawerStatus = React.useContext(DrawerStatusContext);

if (drawerStatus === undefined) {
Expand Down

0 comments on commit f9ae6bb

Please sign in to comment.