Skip to content

Commit

Permalink
Remove Dead Code (#1323)
Browse files Browse the repository at this point in the history
* remove emotion

* remove some js dependencies

* remove uuid generator

* remove unused provider

* remove unused files, fix onboarding

* tests

* remove flow and shield
  • Loading branch information
JacobJaffe authored Jul 28, 2020
1 parent af08f6a commit 1eca568
Show file tree
Hide file tree
Showing 68 changed files with 27 additions and 5,277 deletions.
75 changes: 0 additions & 75 deletions .flowconfig

This file was deleted.

9 changes: 3 additions & 6 deletions App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useEffect } from 'react';
import { MenuProvider } from 'react-native-popup-menu';
import SplashScreen from 'react-native-splash-screen';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
Expand All @@ -15,11 +14,9 @@ import BackgroundTaskService from './app/services/BackgroundTaskService';

// For snapshot testing. In tests, we provide a mock store wrapper if needed.
export const UnconnectedApp = () => (
<MenuProvider>
<TracingStrategyProvider strategy={gpsStrategy}>
<Entry />
</TracingStrategyProvider>
</MenuProvider>
<TracingStrategyProvider strategy={gpsStrategy}>
<Entry />
</TracingStrategyProvider>
);

const App = () => {
Expand Down
4 changes: 1 addition & 3 deletions __tests__/__snapshots__/App.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ exports[`renders correctly 1`] = `
}
}
>
<MenuProvider>
<Entry />
</MenuProvider>
<Entry />
</View>
`;
7 changes: 0 additions & 7 deletions app/Entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,10 @@ import { LicensesScreen } from './views/Licenses';
import { ExportStart, ExportLocally } from './gps/Export';

import ExposureHistoryScreen from './views/ExposureHistory';
import NextSteps from './views/ExposureHistory/NextSteps';
import MoreInfo from './views/ExposureHistory/MoreInfo';
import ImportFromUrl from './views/Settings/ImportFromUrl';
import { FeatureFlagsScreen } from './views/FeatureFlagToggles';
import ImportScreen from './views/Import';
import { EnableExposureNotifications } from './views/onboarding/EnableExposureNotifications';
import Welcome from './views/onboarding/Welcome';
import PersonalPrivacy from './views/onboarding/PersonalPrivacy';
import NotificationDetails from './views/onboarding/NotificationDetails';
Expand Down Expand Up @@ -77,7 +75,6 @@ const ExposureHistoryStack = ({ navigation }) => {
name={Screens.ExposureHistory}
component={ExposureHistoryScreen}
/>
<Stack.Screen name={Screens.NextSteps} component={NextSteps} />
<Stack.Screen name={Screens.MoreInfo} component={MoreInfo} />
</Stack.Navigator>
);
Expand Down Expand Up @@ -224,10 +221,6 @@ const OnboardingStack = () => (
name={Screens.OnboardingLocationPermissions}
component={LocationsPermissions}
/>
<Stack.Screen
name={Screens.EnableExposureNotifications}
component={EnableExposureNotifications}
/>
</Stack.Navigator>
);

Expand Down
5 changes: 0 additions & 5 deletions app/assets/images/permissionDenied.svg

This file was deleted.

5 changes: 0 additions & 5 deletions app/assets/images/permissionGranted.svg

This file was deleted.

3 changes: 0 additions & 3 deletions app/assets/images/permissionUnknown.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/svgs/TabBarNav/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ export { LocationsActive, LocationsInactive } from './Locations';
export { MoreActive, MoreInactive } from './More';
export { ShieldActive, ShieldInactive } from './Shield';
export { NotificationIcon } from './NotificationIcon';
export { SelfAssessmentActive, SelfAssessmentInactive } from './SelfAssessment';
export { CalendarActive, CalendarInactive } from './Calendar';
2 changes: 0 additions & 2 deletions app/assets/svgs/check.js

This file was deleted.

2 changes: 0 additions & 2 deletions app/assets/svgs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import LocationPin from './locationPin';
import Publish from './publish';
import QuestionMark from './questionMark';
import RadioWave from './radioWave';
import SelfAssessment from './selfAssessment';
import StateNoContact from './stateNoContact';
import StateUnknown from './stateUnknown';
import Upload from './upload';
Expand All @@ -42,7 +41,6 @@ export const Icons = {
Publish,
QuestionMark,
RadioWave,
SelfAssessment,
StateNoContact,
StateUnknown,
Upload,
Expand Down
6 changes: 0 additions & 6 deletions app/assets/svgs/selfAssessment.ts

This file was deleted.

17 changes: 9 additions & 8 deletions app/components/IconButton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from '@emotion/native';
import React from 'react';
import { SvgXml } from 'react-native-svg';
import { Colors } from '../styles';
import { TouchableOpacity } from 'react-native';

interface IconButtonProps {
icon: string;
Expand All @@ -19,18 +19,19 @@ export const IconButton = ({
...otherProps
}: IconButtonProps): JSX.Element => {
return (
<Container accessibilityLabel={accessibilityLabel} {...otherProps}>
<TouchableOpacity
style={{
alignItems: 'center',
alignContent: 'center',
}}
accessibilityLabel={accessibilityLabel}
{...otherProps}>
<SvgXml
color={color || Colors.icon}
xml={icon}
width={size || 24}
height={size || 24}
/>
</Container>
</TouchableOpacity>
);
};

const Container = styled.TouchableOpacity`
align-items: center;
align-content: center;
`;
135 changes: 0 additions & 135 deletions app/encryption/intersection.py

This file was deleted.

4 changes: 0 additions & 4 deletions app/navigation/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ export type Screen =
| 'ExportComplete'
| 'ExposureHistory'
| 'ExportLocally'
| 'NextSteps'
| 'MoreInfo'
| 'ExposureListDebugScreen'
| 'Settings'
| 'About'
| 'Licenses'
Expand Down Expand Up @@ -67,9 +65,7 @@ export const Screens: { [key in Screen]: Screen } = {
ExportComplete: 'ExportComplete',
ExposureHistory: 'ExposureHistory',
ExportLocally: 'ExportLocally',
NextSteps: 'NextSteps',
MoreInfo: 'MoreInfo',
ExposureListDebugScreen: 'ExposureListDebugScreen',
Settings: 'Settings',
About: 'About',
Licenses: 'Licenses',
Expand Down
7 changes: 0 additions & 7 deletions app/styles/typography.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,13 +275,6 @@ export const buttonTextTinyDark: TextStyle = {
...tinyFont,
};

// Assessment
export const assessmentInstruction: TextStyle = {
...mediumFont,
color: Colors.secondaryHeaderText,
lineHeight: smallerLineHeight,
};

export const inputLabel: TextStyle = {
...bold,
color: Colors.primaryText,
Expand Down
Loading

0 comments on commit 1eca568

Please sign in to comment.