Commit 633f2a96 authored by Martin Santangelo's avatar Martin Santangelo

(chore) fix nav types

parent 59a14c5e
import React from 'react';
import { AppStackParamList } from '../../../navigation/NavigationTypes';
import { ActivityFullScreenParamList } from '../../../navigation/NavigationTypes';
import { RouteProp } from '@react-navigation/native';
import { useLocalStore, observer } from 'mobx-react';
import {
......@@ -15,7 +15,7 @@ import { useDimensions } from '@react-native-community/hooks';
import ThemedStyles from '../../../styles/ThemedStyles';
type ActivityFullScreenRouteProp = RouteProp<
AppStackParamList,
ActivityFullScreenParamList,
'ActivityFullScreen'
>;
......
......@@ -51,6 +51,7 @@ import {
AuthStackParamList,
AppStackParamList,
MainSwiperParamList,
ActivityFullScreenParamList,
} from './NavigationTypes';
import EditChannelStack from '../channel/v2/edit/EditChannelStack';
import ReceiverAddressScreen from '../wallet/v2/address/ReceiverAddressScreen';
......@@ -76,7 +77,9 @@ const AuthStackNav = createNativeStackNavigator<AuthStackParamList>();
const RootStackNav = createNativeStackNavigator<RootStackParamList>();
const MainSwiper = createMaterialTopTabNavigator<MainSwiperParamList>();
const FullScreenPostStackNav = createSharedElementStackNavigator();
const FullScreenPostStackNav = createSharedElementStackNavigator<
ActivityFullScreenParamList
>();
const FullScreenPostStack = () => (
<FullScreenPostStackNav.Navigator>
......@@ -88,7 +91,7 @@ const FullScreenPostStack = () => (
<FullScreenPostStackNav.Screen
name="ViewImage"
component={ViewImageScreen}
options={({ route }) => ({
options={({ route }: { route: any }) => ({
title: route.params.entity.ownerObj.name,
headerStyle: {
backgroundColor: '#000',
......
......@@ -4,6 +4,7 @@ import { RouteProp } from '@react-navigation/native';
import { StackNavigationProp } from '@react-navigation/stack';
import { WalletStoreType } from '../wallet/v2/createWalletStore';
import type FeedStore from '../common/stores/FeedStore';
import ActivityModel from '../newsfeed/ActivityModel';
export type MainSwiperParamList = {
Capture: {};
......@@ -25,6 +26,16 @@ export type AuthStackParamList = {
Register: {};
};
export type ActivityFullScreenParamList = {
ActivityFullScreen: {
feed: FeedStore;
current: number;
};
ViewImage: {
entity: ActivityModel;
};
};
export type AppStackParamList = {
Fab: {
disableThresholdCheck?: boolean;
......@@ -37,10 +48,7 @@ export type AppStackParamList = {
walletStore?: WalletStoreType;
options?: Function;
};
ActivityFullScreen: {
feed: FeedStore;
current: number;
};
ActivityFullScreenNav: {};
Newsfeed: {};
Capture: {};
StackCapture: {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment