Skip to content

Commit

Permalink
[TS migration] Migrate 'overscrollBehaviorContain' style to TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
blazejkustra committed Nov 29, 2023
1 parent 1234b0d commit f85b1bd
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 4 deletions.
27 changes: 27 additions & 0 deletions src/libs/Navigation/AppNavigator/ReportScreenWrapper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react';
import ReportScreen from '@pages/home/ReportScreen';
import ReportScreenIDSetter from './ReportScreenIDSetter';

type Props = {
route: any;
navigation: any;
};

function ReportScreenWrapper({route, navigation}: Props) {
// The ReportScreen without the reportID set will display a skeleton
// until the reportID is loaded and set in the route param
return (
<>
{/* @ts-expect-error explanation */}
<ReportScreen route={route} />
<ReportScreenIDSetter
route={route}
navigation={navigation}
/>
</>
);
}

ReportScreenWrapper.displayName = 'ReportScreenWrapper';

export default ReportScreenWrapper;
3 changes: 0 additions & 3 deletions src/styles/utilities/overscrollBehaviorContain/index.js

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import OverscrollBehaviorStyles from './types';

const overscrollBehaviorContain: OverscrollBehaviorStyles = {};

export default overscrollBehaviorContain;
7 changes: 7 additions & 0 deletions src/styles/utilities/overscrollBehaviorContain/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import OverscrollBehaviorStyles from './types';

const overscrollBehaviorContain: OverscrollBehaviorStyles = {
overscrollBehavior: 'contain',
};

export default overscrollBehaviorContain;
5 changes: 5 additions & 0 deletions src/styles/utilities/overscrollBehaviorContain/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import {ViewStyle} from 'react-native';

type OverscrollBehaviorStyles = Pick<ViewStyle, 'overscrollBehavior'>;

export default OverscrollBehaviorStyles;

0 comments on commit f85b1bd

Please sign in to comment.