Skip to content

Commit

Permalink
Update _screen-sample.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
kanzitelli committed Feb 15, 2023
1 parent 6accdc9 commit fe20ff6
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions src/screens/_screen-sample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ import {useNavigation} from '@react-navigation/native';
import {NavioScreen} from 'rn-navio';

import {services, useServices} from '../services';
// import {useStores} from '../stores';
import {Section} from '../components/section';
import {BButton} from '../components/button';
import {useAppearance} from '../utils/hooks';
import {NavioSection} from '../components/sections/NavioSection';

export type Props = {
type?: 'push';
Expand All @@ -24,12 +22,6 @@ export const Example: NavioScreen<Props> = observer(({type = 'push'}) => {
// State

// Methods
const push = () => navio.push('Example', {type: 'push'});
const pushStack = () => navio.pushStack('ExampleStack');
const jumpTo = () => navio.jumpTo('PlaygroundTab');
const show = () => navio.show('ExampleModal');
const setRoot = () => navio.setRoot('Tabs');
const goBack = () => navio.pop();

// Start
useEffect(() => {
Expand All @@ -46,14 +38,7 @@ export const Example: NavioScreen<Props> = observer(({type = 'push'}) => {
return (
<View flex bg-bgColor>
<ScrollView contentInsetAdjustmentBehavior="always">
<Section title={t.do('section.navio.title')}>
<BButton marginV-s1 label={t.do('section.navio.button.push')} onPress={push} />
<BButton marginV-s1 label={t.do('section.navio.button.push_stack')} onPress={pushStack} />
<BButton marginV-s1 label={t.do('section.navio.button.jump_to')} onPress={jumpTo} />
<BButton marginV-s1 label={t.do('section.navio.button.show')} onPress={show} />
<BButton marginV-s1 label={t.do('section.navio.button.back')} onPress={goBack} />
<BButton marginV-s1 label={'Set Root - Tabs'} onPress={setRoot} />
</Section>
<NavioSection />
</ScrollView>
</View>
);
Expand Down

0 comments on commit fe20ff6

Please sign in to comment.