Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
19 kB
1
Indexable
Never
import React from 'react';

import {
  createStackNavigator,
  createBottomTabNavigator,
  createSwitchNavigator,
} from 'react-navigation';
import {
  NavigationContainer,
  DefaultTheme as NavigationDefaultTheme,
} from '@react-navigation/native';
import { MenuProvider } from 'react-native-popup-menu';
import { CommonContextProvider } from '../components/src/CommonContextProvider';
import HomeScreen from '../components/src/HomeScreen';
import InfoPage from '../blocks/info-page/src/InfoPageBlock';
import Customform from '../blocks/customform/src/Customform';
import ForgotPassword from '../blocks/forgot-password/src/ForgotPassword';
import ForgotPasswordOTP from '../blocks/forgot-password/src/ForgotPasswordOTP';
import NewPassword from '../blocks/forgot-password/src/NewPassword';
import Categoriessubcategories from '../blocks/categoriessubcategories/src/Categoriessubcategories';
import LikeAPost from '../blocks/LikeAPost/src/LikeAPost';
import CfAnimationsAndTransition2 from '../blocks/CfAnimationsAndTransition2/src/CfAnimationsAndTransition2';
import AppleMusicApi2 from '../blocks/AppleMusicApi2/src/AppleMusicApi2';
import SendAMessage from '../blocks/SendAMessage/src/SendAMessage';
import Referrals from '../blocks/Referrals/src/Referrals';
import CountryCodeSelector from '../blocks/country-code-selector/src/CountryCodeSelector';
import CountryCodeSelectorTable from '../blocks/country-code-selector/src/CountryCodeSelectorTable';
import PhotoLibrary3 from '../blocks/PhotoLibrary3/src/PhotoLibrary3';
import AutomaticRenewals2 from '../blocks/AutomaticRenewals2/src/AutomaticRenewals2';
import TargetedFeed from '../blocks/TargetedFeed/src/TargetedFeed';
import ContentManagement from '../blocks/ContentManagement/src/ContentManagement';
import UserGroups from '../blocks/UserGroups/src/UserGroups';
import ContentFlag from '../blocks/ContentFlag/src/ContentFlag';
import EmailAccountLoginBlock from '../blocks/email-account-login/src/EmailAccountLoginBlock';
import Location from '../blocks/location/src/Location';
import Notifications from '../blocks/Notifications/src/Notifications';
import EmailAccountRegistration from '../blocks/email-account-registration/src/EmailAccountRegistration';
import AuthLoadingScreen from '../blocks/email-account-login/src/AuthLoadingScreen';
import ActivityLog from '../blocks/ActivityLog/src/ActivityLog';
import AdManager from '../blocks/AdManager/src/AdManager';
import Themes from '../blocks/Themes/src/Themes';
import CustomAdvertisements from '../blocks/CustomAdvertisements/src/CustomAdvertisements';
import Comments from '../blocks/Comments/src/Comments';
import Followers from '../blocks/Followers/src/Followers';
import AudioMusic from '../blocks/AudioMusic/src/AudioMusic';
import HelpCenter from '../blocks/HelpCenter/src/HelpCenter';
import SpotifyApiIntegration2 from '../blocks/SpotifyApiIntegration2/src/SpotifyApiIntegration2';
import Repost from '../blocks/Repost/src/Repost';
import Onboardingguide from '../blocks/onboardingguide/src/Onboardingguide';
import Hashtags from '../blocks/Hashtags/src/Hashtags';
import Mentionstagging from '../blocks/Mentionstagging/src/Mentionstagging';
import Catalogue from '../blocks/catalogue/src/Catalogue';
import Pushnotifications from '../blocks/pushnotifications/src/Pushnotifications';
import VisualAnalytics from '../blocks/VisualAnalytics/src/VisualAnalytics';
import Sorting from '../blocks/sorting/src/Sorting';
import PostCreation from '../blocks/postcreation/src/PostCreation';
import Posts from '../blocks/postcreation/src/Posts';
import PostDetails from '../blocks/postcreation/src/PostDetails';
import Trending from '../blocks/Trending/src/Trending';
import BulkUploading from '../blocks/BulkUploading/src/BulkUploading';
import RolesPermissions2 from '../blocks/RolesPermissions2/src/RolesPermissions2';
import RecommendationEngine4 from '../blocks/RecommendationEngine4/src/RecommendationEngine4';
import AdminConsole3 from '../blocks/AdminConsole3/src/AdminConsole3';
import HamburgerMenu from '../blocks/HamburgerMenu/src/HamburgerMenu';
import LandingPage from '../blocks/landingpage/src/LandingPage';
import ContentModeration from '../blocks/ContentModeration/src/ContentModeration';
import Analytics3 from '../blocks/Analytics3/src/Analytics3';
import AutomaticCheckoutCalculation2 from '../blocks/AutomaticCheckoutCalculation2/src/AutomaticCheckoutCalculation2';
import Customisableusersubscriptions from '../blocks/customisableusersubscriptions/src/Customisableusersubscriptions';
import SubscriptionDetails from '../blocks/customisableusersubscriptions/src/SubscriptionDetails';
import Filteritems from '../blocks/filteritems/src/Filteritems';
import Filteroptions from '../blocks/filteritems/src/Filteroptions';
import SocialMediaAccountLoginScreen from '../blocks/social-media-account-login/src/SocialMediaAccountLoginScreen';
import CustomisableUserProfiles from '../blocks/CustomisableUserProfiles/src/CustomisableUserProfiles';
import OTPInputAuth from '../blocks/otp-input-confirmation/src/OTPInputAuth';
import ApiIntegration8 from '../blocks/ApiIntegration8/src/ApiIntegration8';
import DynamicContent from '../blocks/DynamicContent/src/DynamicContent';
import NavigationMenu from '../blocks/NavigationMenu/src/NavigationMenu';
import SocialMediaAccountRegistrationScreen from '../blocks/social-media-account-registration/src/SocialMediaAccountRegistrationScreen';
import DeepLinking from '../blocks/DeepLinking/src/DeepLinking';
import Notificationsettings from '../blocks/notificationsettings/src/Notificationsettings';
import Share from '../blocks/Share/src/Share';
import PrivacySettings from '../blocks/PrivacySettings/src/PrivacySettings';
import ElasticSearch from '../blocks/ElasticSearch/src/ElasticSearch';
import PaypalIntegration from '../blocks/PaypalIntegration/src/PaypalIntegration';
import ReviewAndApproval from '../blocks/ReviewAndApproval/src/ReviewAndApproval';
import ApiIntegration from '../blocks/apiintegration/src/ApiIntegration';
import SwitchAccounts from '../blocks/SwitchAccounts/src/SwitchAccounts';
import AnimationsAndTransition3 from '../blocks/AnimationsAndTransition3/src/AnimationsAndTransition3';
import HelpCentre from '../blocks/helpcentre/src/HelpCentre';
import HelpCentreQA from '../blocks/helpcentre/src/HelpCentreQA';
import HelpCentreSub from '../blocks/helpcentre/src/HelpCentreSub';
import Playlist4 from '../blocks/Playlist4/src/Playlist4';
import FormApprovalWorkflow from '../blocks/FormApprovalWorkflow/src/FormApprovalWorkflow';
import AutomaticRenewals from '../blocks/automaticrenewals/src/AutomaticRenewals';
import ThemeBlock from '../blocks/themeblock/src/ThemeBlock';
import CfTastemakerDesignAndDevelopmentChangesAndAdditions3 from '../blocks/CfTastemakerDesignAndDevelopmentChangesAndAdditions3/src/CfTastemakerDesignAndDevelopmentChangesAndAdditions3';
import { ActivityIndicator, StatusBar, View } from 'react-native';
import ResetPassword from '../blocks/forgot-password/src/ResetPassword';
import FeedBlock from '../blocks/categoriessubcategories/src/MainFeed/FeedBlock';
import EditPostBlock from '../blocks/categoriessubcategories/src/CreatePost/EditPostBlock';
import CreatePostBlock from '../blocks/categoriessubcategories/src/CreatePost/CreatePostBlock';
import Chats from '../blocks/categoriessubcategories/src/Chats/Chats';
import NewChat from '../blocks/categoriessubcategories/src/Chats/NewChat';
import ChatDetails from '../blocks/categoriessubcategories/src/Chats/ChatDetails';
import Streaming from '../blocks/email-account-registration/src/StreamingArtist';
import TermsAndConditions from '../blocks/DynamicContent/src/TermsAndConditons';
import ChatListScreen from '../blocks/categoriessubcategories/src/Chats/ChatListScreen';

const HomeStack = createStackNavigator({
  Home: {
    screen: HomeScreen,
    navigationOptions: { header: null, title: 'Home' },
  },
  AnimationsAndTransition3: {
    screen: AnimationsAndTransition3,
    navigationOptions: { title: 'AnimationsAndTransition3' },
  },
  HelpCentre: {
    screen: HelpCentre,
    navigationOptions: { title: 'HelpCentre' },
  },
  HelpCentreQA: {
    screen: HelpCentreQA,
    navigationOptions: { title: 'HelpCentreQA' },
  },
  HelpCentreSub: {
    screen: HelpCentreSub,
    navigationOptions: { title: 'HelpCentreSub' },
  },
  Playlist4: { screen: Playlist4, navigationOptions: { title: 'Playlist4' } },
  FormApprovalWorkflow: {
    screen: FormApprovalWorkflow,
    navigationOptions: { title: 'FormApprovalWorkflow' },
  },
  AutomaticRenewals: {
    screen: AutomaticRenewals,
    navigationOptions: { title: 'AutomaticRenewals' },
  },
  ThemeBlock: {
    screen: ThemeBlock,
    navigationOptions: { title: 'ThemeBlock' },
  },
  CfTastemakerDesignAndDevelopmentChangesAndAdditions3: {
    screen: CfTastemakerDesignAndDevelopmentChangesAndAdditions3,
    navigationOptions: {
      title: 'CfTastemakerDesignAndDevelopmentChangesAndAdditions3',
    },
  },
  ResetPassword: {
    screen: ResetPassword,
    navigationOptions: { header: null, title: 'ResetPassword' },
  },
  FeedBlock: {
    screen: FeedBlock,
    navigationOptions: { header: null, title: 'FeedBlock' },
  },
  ApiIntegration: {
    screen: ApiIntegration,
    navigationOptions: { title: 'ApiIntegration' },
  },
  SwitchAccounts: {
    screen: SwitchAccounts,
    navigationOptions: { title: 'SwitchAccounts' },
  },

  Customform: {
    screen: Customform,
    navigationOptions: { title: 'Customform' },
  },
  ForgotPassword: {
    screen: ForgotPassword,
    navigationOptions: { title: 'ForgotPassword' },
  },
  ForgotPasswordOTP: {
    screen: ForgotPasswordOTP,
    navigationOptions: { header: null, title: 'ForgotPasswordOTP' },
  },
  NewPassword: {
    screen: NewPassword,
    navigationOptions: { title: 'NewPassword' },
  },
  Categoriessubcategories: {
    screen: Categoriessubcategories,
    navigationOptions: { title: 'Categoriessubcategories' },
  },
  LikeAPost: { screen: LikeAPost, navigationOptions: { title: 'LikeAPost' } },
  CfAnimationsAndTransition2: {
    screen: CfAnimationsAndTransition2,
    navigationOptions: { title: 'CfAnimationsAndTransition2' },
  },
  AppleMusicApi2: {
    screen: AppleMusicApi2,
    navigationOptions: { title: 'AppleMusicApi2' },
  },
  SendAMessage: {
    screen: SendAMessage,
    navigationOptions: { title: 'SendAMessage' },
  },
  Referrals: { screen: Referrals, navigationOptions: { title: 'Referrals' } },
  CountryCodeSelector: {
    screen: CountryCodeSelector,
    navigationOptions: { title: 'CountryCodeSelector' },
  },
  CountryCodeSelectorTable: {
    screen: CountryCodeSelectorTable,
    navigationOptions: { title: 'CountryCodeSelectorTable' },
  },
  PhotoLibrary3: {
    screen: PhotoLibrary3,
    navigationOptions: { title: 'PhotoLibrary3' },
  },
  AutomaticRenewals2: {
    screen: AutomaticRenewals2,
    navigationOptions: { title: 'AutomaticRenewals2' },
  },
  TargetedFeed: {
    screen: TargetedFeed,
    navigationOptions: { title: 'TargetedFeed' },
  },
  ContentManagement: {
    screen: ContentManagement,
    navigationOptions: { title: 'ContentManagement' },
  },
  UserGroups: {
    screen: UserGroups,
    navigationOptions: { title: 'UserGroups' },
  },
  ContentFlag: {
    screen: ContentFlag,
    navigationOptions: { title: 'ContentFlag' },
  },

  Location: { screen: Location, navigationOptions: { title: 'Location' } },
  Notifications: {
    screen: Notifications,
    navigationOptions: { header: null, title: 'Notifications' },
  },

  ActivityLog: {
    screen: ActivityLog,
    navigationOptions: { title: 'ActivityLog' },
  },
  AdManager: { screen: AdManager, navigationOptions: { title: 'AdManager' } },
  Themes: { screen: Themes, navigationOptions: { title: 'Themes' } },
  CustomAdvertisements: {
    screen: CustomAdvertisements,
    navigationOptions: { title: 'CustomAdvertisements' },
  },
  Comments: { screen: Comments, navigationOptions: { title: 'Comments' } },
  Followers: { screen: Followers, navigationOptions: { title: 'Followers' } },
  AudioMusic: {
    screen: AudioMusic,
    navigationOptions: { title: 'AudioMusic' },
  },
  HelpCenter: {
    screen: HelpCenter,
    navigationOptions: { title: 'HelpCenter' },
  },
  SpotifyApiIntegration2: {
    screen: SpotifyApiIntegration2,
    navigationOptions: { title: 'SpotifyApiIntegration2' },
  },
  Repost: { screen: Repost, navigationOptions: { title: 'Repost' } },
  Onboardingguide: {
    screen: Onboardingguide,
    navigationOptions: { title: 'Onboardingguide' },
  },
  Hashtags: { screen: Hashtags, navigationOptions: { title: 'Hashtags' } },
  Mentionstagging: {
    screen: Mentionstagging,
    navigationOptions: { title: 'Mentionstagging' },
  },
  Catalogue: { screen: Catalogue, navigationOptions: { title: 'Catalogue' } },
  Pushnotifications: {
    screen: Pushnotifications,
    navigationOptions: { title: 'Pushnotifications' },
  },
  VisualAnalytics: {
    screen: VisualAnalytics,
    navigationOptions: { title: 'VisualAnalytics' },
  },
  Sorting: { screen: Sorting, navigationOptions: { title: 'Sorting' } },
  PostCreation: {
    screen: PostCreation,
    navigationOptions: { title: 'PostCreation' },
  },
  Posts: { screen: Posts, navigationOptions: { title: 'Posts' } },
  PostDetails: {
    screen: PostDetails,
    navigationOptions: { title: 'PostDetails' },
  },
  Trending: { screen: Trending, navigationOptions: { title: 'Trending' } },
  BulkUploading: {
    screen: BulkUploading,
    navigationOptions: { title: 'BulkUploading' },
  },
  RolesPermissions2: {
    screen: RolesPermissions2,
    navigationOptions: { title: 'RolesPermissions2' },
  },
  RecommendationEngine4: {
    screen: RecommendationEngine4,
    navigationOptions: { title: 'RecommendationEngine4' },
  },
  AdminConsole3: {
    screen: AdminConsole3,
    navigationOptions: { title: 'AdminConsole3' },
  },
  HamburgerMenu: {
    screen: HamburgerMenu,
    navigationOptions: { title: 'HamburgerMenu' },
  },
  LandingPage: {
    screen: LandingPage,
    navigationOptions: { title: 'LandingPage' },
  },
  ContentModeration: {
    screen: ContentModeration,
    navigationOptions: { title: 'ContentModeration' },
  },
  Analytics3: {
    screen: Analytics3,
    navigationOptions: { title: 'Analytics3' },
  },
  AutomaticCheckoutCalculation2: {
    screen: AutomaticCheckoutCalculation2,
    navigationOptions: { title: 'AutomaticCheckoutCalculation2' },
  },
  Customisableusersubscriptions: {
    screen: Customisableusersubscriptions,
    navigationOptions: { title: 'Customisableusersubscriptions' },
  },
  SubscriptionDetails: {
    screen: SubscriptionDetails,
    navigationOptions: { title: 'SubscriptionDetails' },
  },
  Filteritems: {
    screen: Filteritems,
    navigationOptions: { title: 'Filteritems' },
  },
  Filteroptions: {
    screen: Filteroptions,
    navigationOptions: { title: 'Filteroptions' },
  },
  SocialMediaAccountLoginScreen: {
    screen: SocialMediaAccountLoginScreen,
    navigationOptions: { title: 'SocialMediaAccountLoginScreen' },
  },
  CustomisableUserProfiles: {
    screen: CustomisableUserProfiles,
    navigationOptions: { title: 'CustomisableUserProfiles' },
  },
  OTPInputAuth: {
    screen: OTPInputAuth,
    navigationOptions: { title: 'OTPInputAuth' },
  },
  ApiIntegration8: {
    screen: ApiIntegration8,
    navigationOptions: { title: 'ApiIntegration8' },
  },
  DynamicContent: {
    screen: DynamicContent,
    navigationOptions: { header: null, title: 'DynamicContent' },
  },
  NavigationMenu: {
    screen: NavigationMenu,
    navigationOptions: { title: 'NavigationMenu' },
  },
  SocialMediaAccountRegistrationScreen: {
    screen: SocialMediaAccountRegistrationScreen,
    navigationOptions: { title: 'SocialMediaAccountRegistrationScreen' },
  },
  DeepLinking: {
    screen: DeepLinking,
    navigationOptions: { title: 'DeepLinking' },
  },
  Notificationsettings: {
    screen: Notificationsettings,
    navigationOptions: { title: 'Notificationsettings' },
  },
  Share: { screen: Share, navigationOptions: { title: 'Share' } },
  PrivacySettings: {
    screen: PrivacySettings,
    navigationOptions: { title: 'PrivacySettings' },
  },
  ElasticSearch: {
    screen: ElasticSearch,
    navigationOptions: { header: null, title: 'ElasticSearch' },
  },
  PaypalIntegration: {
    screen: PaypalIntegration,
    navigationOptions: { title: 'PaypalIntegration' },
  },
  ReviewAndApproval: {
    screen: ReviewAndApproval,
    navigationOptions: { title: 'ReviewAndApproval' },
  },
  EditPostBlock: {
    screen: EditPostBlock,
    navigationOptions: {
      header: null,
      title: 'EditPostBlock',
    },
    Streaming: {
      screen: Streaming,
      navigationOptions: {
        header: null,
        title: 'Streaming',
      },
    },
    TermsAndConditions: {
      screen: TermsAndConditions,
      navigationOptions: {
        header: null,
        title: 'TermsAndConditions',
      },
    },
  },
  CreatePostBlock: {
    screen: CreatePostBlock,
    navigationOptions: {
      header: null,
      title: 'CreatePostBlock',
    },
  },
  Chats: {
    screen: Chats,
    navigationOptions: { header: null, title: 'Chats' },
  },
  ChatListScreen: {
    screen: ChatListScreen,
    navigationOptions: { header: null, title: 'ChatListScreen' },
  },
  NewChat: {
    screen: NewChat,
    navigationOptions: { header: null, title: 'NewChat' },
  },
  ChatDetails: {
    screen: ChatDetails,
    navigationOptions: { header: null, title: 'ChatDetails' },
  },

  InfoPage: { screen: InfoPage, navigationOptions: { title: 'Info' } },
});

if (!HomeScreen.instance) {
  const defaultProps = {
    navigation: null,
    id: 'HomeScreen',
  };
  const homeScreen = new HomeScreen(defaultProps);
}

const AuthStack = createStackNavigator({
  EmailAccountLoginBlock: {
    screen: EmailAccountLoginBlock,
    navigationOptions: { header: null, title: 'EmailAccountLoginBlock' },
  },
  EmailAccountRegistration: {
    screen: EmailAccountRegistration,
    navigationOptions: { header: null, title: 'EmailAccountRegistration' },
  },
});

const SwitchRoutes = createSwitchNavigator(
  {
    AuthLoading: AuthLoadingScreen,
    App: ChatDetails,
    // App: HomeStack,
    Auth: AuthStack,
  },
  {
    initialRouteName: 'AuthLoading',
  }
);

export function App() {
  return (
    <View style={{ flex: 1 }}>
      <StatusBar backgroundColor={'white'} barStyle="dark-content" />
      <MenuProvider>
        <CommonContextProvider>
          <NavigationContainer>
            <SwitchRoutes />
          </NavigationContainer>
        </CommonContextProvider>
      </MenuProvider>
    </View>
  );
}