Skip to content

Commit

Permalink
fix(frontend): address app linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mikonse committed Nov 10, 2023
1 parent ce476b4 commit 80a8bd2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 68 deletions.
21 changes: 7 additions & 14 deletions frontend/apps/mobile/src/AppWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,15 @@ import "react-native-gesture-handler";
import { Provider } from "react-redux";
import { PersistGate } from "redux-persist/integration/react";
import { App } from "./App";
import { useCachedResources } from "./hooks/useCachedResources";
import SplashScreen from "./screens/SplashScreen";
import { persistor, store } from "./store";

export const AppWrapper: React.FC = () => {
const isLoadingComplete = useCachedResources();

if (!isLoadingComplete) {
return <SplashScreen />;
} else {
return (
<Provider store={store}>
<PersistGate loading={<SplashScreen />} persistor={persistor}>
<App />
</PersistGate>
</Provider>
);
}
return (
<Provider store={store}>
<PersistGate loading={<SplashScreen />} persistor={persistor}>
<App />
</PersistGate>
</Provider>
);
};
36 changes: 0 additions & 36 deletions frontend/apps/mobile/src/hooks/useCachedResources.ts

This file was deleted.

8 changes: 0 additions & 8 deletions frontend/apps/mobile/src/navigation/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import { NavigationContainer } from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";
import * as React from "react";
import { useEffect } from "react";
import { View } from "react-native";
import { Text } from "react-native-paper";
import MaterialIcons from "react-native-vector-icons/MaterialIcons";
import { clearingAccountIcon, personalAccountIcon } from "../constants/Icons";
import { useOptionalApi } from "../core/ApiProvider";
Expand Down Expand Up @@ -49,12 +47,6 @@ export const Navigation: React.FC<{ theme: Theme }> = ({ theme }) => {

const Drawer = createDrawerNavigator<RootDrawerParamList>();

const DummyScreen = () => (
<View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
<Text>Dummy Screen</Text>
</View>
);

const RootNavigator: React.FC = () => {
const { api, websocket } = useOptionalApi();
const dispatch = useAppDispatch();
Expand Down
12 changes: 2 additions & 10 deletions frontend/apps/mobile/src/navigation/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,10 @@
* https://reactnavigation.org/docs/typescript/
*/

import { CompositeScreenProps, NavigatorScreenParams } from "@react-navigation/native";
import { StackScreenProps } from "@react-navigation/stack";
import { DrawerScreenProps } from "@react-navigation/drawer";
import { MaterialTopTabScreenProps } from "@react-navigation/material-top-tabs";

declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace ReactNavigation {
// @ts-ignore
type RootParamList = RootDrawerParamList;
}
}
import { CompositeScreenProps, NavigatorScreenParams } from "@react-navigation/native";
import { StackScreenProps } from "@react-navigation/stack";

export type RootDrawerParamList = {
GroupStackNavigator: NavigatorScreenParams<GroupStackParamList>;
Expand Down

0 comments on commit 80a8bd2

Please sign in to comment.