Skip to content

Commit

Permalink
redundant code from nav service removed
Browse files Browse the repository at this point in the history
  • Loading branch information
kanzitelli committed Jan 10, 2022
1 parent 8f55869 commit ff20cf2
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions src/services/navigation/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {BottomTabs, Component, Root, Stack} from 'rnn-screens';

import {navDefaultOptions} from './options';
import {screens} from '../../screens';

Expand All @@ -14,33 +12,6 @@ export class NavService implements IService {
}
};

start = async (appType: AppType = 'three_tabs'): PVoid => {
if (appType === 'one_screen') {
await this.startOneScreenApp();
}
if (appType === 'three_tabs') {
await this.startThreeTabsApp();
}

screens.getConstants(); // needs to be called after setRoot()
};

private startOneScreenApp = async (): PVoid => {
await screens.N.setRoot(Root(Stack(Component(screens.get('Main')))));
};

private startThreeTabsApp = async (): PVoid => {
await screens.N.setRoot(
Root(
BottomTabs([
Stack(Component(screens.get('Main'))),
Stack(Component(screens.get('Example'))),
Stack(Component(screens.get('Settings'))),
]),
),
);
};

private setDefaultOptions = (): void => {
screens.N.setDefaultOptions(navDefaultOptions());
};
Expand Down

0 comments on commit ff20cf2

Please sign in to comment.