Skip to content

Commit 03d9e7c

Browse files
committed
fix storybook errors
1 parent 0d30b48 commit 03d9e7c

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

.storybook/main.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type {StorybookConfig} from 'storybook/internal/types';
1+
import type {StorybookConfig} from '@storybook/react-webpack5';
22

33
const main: StorybookConfig = {
44
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
@@ -15,6 +15,9 @@ const main: StorybookConfig = {
1515
options: {},
1616
},
1717
docs: {},
18+
typescript: {
19+
reactDocgen: false,
20+
},
1821
};
1922

2023
export default main;

__mocks__/@react-navigation/native/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ const {triggerTransitionEnd, addListener} = isJestEnv
1818

1919
const useNavigation = isJestEnv
2020
? realReactNavigation.useNavigation
21-
: {
21+
: () => ({
2222
navigate: isJestEnv ? jest.fn() : () => {},
2323
getState: () => ({
2424
routes: [],
2525
}),
2626
addListener,
27-
};
27+
});
2828

2929
type NativeNavigationMock = typeof ReactNavigation & {
3030
triggerTransitionEnd: () => void;

src/components/Search/SearchContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {useNavigation} from '@react-navigation/core';
1+
import {useNavigation} from '@react-navigation/native';
22
import type {NavigationState} from '@react-navigation/routers';
33
import React, {useContext, useEffect, useRef, useState} from 'react';
44
// We need direct access to useOnyx from react-native-onyx to avoid circular dependencies in SearchContext

0 commit comments

Comments
 (0)