Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/components/Screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
viewConfig: {
validAttributes: {
style: {
display: boolean;
display: boolean | null;
};
};
};
_viewConfig: {
validAttributes: {
style: {
display: boolean;
display: boolean | null;
};
};
};
Expand Down Expand Up @@ -165,7 +165,7 @@
React.useImperativeHandle(ref, () => innerRef.current!, []);
const prevActivityState = usePrevious(props.activityState);

const setRef = (ref: ViewConfig) => {

Check warning on line 168 in src/components/Screen.tsx

View workflow job for this annotation

GitHub Actions / install-and-lint

'ref' is already declared in the upper scope on line 163 column 31
innerRef.current = ref;
props.onComponentRef?.(ref);
};
Expand Down Expand Up @@ -234,7 +234,7 @@
gestureResponseDistance,
onGestureCancel,
style,
...props

Check warning on line 237 in src/components/Screen.tsx

View workflow job for this annotation

GitHub Actions / install-and-lint

'props' is already declared in the upper scope on line 163 column 24
} = rest;

if (active !== undefined && activityState === undefined) {
Expand All @@ -256,17 +256,19 @@
}
}

const handleRef = (ref: ViewConfig) => {

Check warning on line 259 in src/components/Screen.tsx

View workflow job for this annotation

GitHub Actions / install-and-lint

'ref' is already declared in the upper scope on line 163 column 31
// Workaround is necessary to prevent React Native from hiding frozen screens.
// See this PR: https://github.com/grahammendick/navigation/pull/860
if (ref?.viewConfig?.validAttributes?.style) {
ref.viewConfig.validAttributes.style = {
...ref.viewConfig.validAttributes.style,
display: false,
display: null,
};
setRef(ref);
} else if (ref?._viewConfig?.validAttributes?.style) {
ref._viewConfig.validAttributes.style = {
...ref._viewConfig.validAttributes.style,
display: false,
display: null,
};
setRef(ref);
}
Expand Down Expand Up @@ -357,7 +359,7 @@
style,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
onComponentRef,
...props

Check warning on line 362 in src/components/Screen.tsx

View workflow job for this annotation

GitHub Actions / install-and-lint

'props' is already declared in the upper scope on line 163 column 24
} = rest;

if (active !== undefined && activityState === undefined) {
Expand All @@ -365,7 +367,7 @@
}
return (
<Animated.View
style={[style, { display: activityState !== 0 ? 'flex' : 'none' }]}

Check warning on line 370 in src/components/Screen.tsx

View workflow job for this annotation

GitHub Actions / install-and-lint

Inline style: { display: "activityState !== 0 ? 'flex' : 'none'" }
ref={setRef}
{...props}
/>
Expand Down
Loading