Change main page and modify flows
This commit is contained in:
@@ -37,7 +37,7 @@ export default function HomeStackScreen() {
|
||||
component={Home}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<HomeStack.Screen
|
||||
<HomeStack.Screen
|
||||
name={Routes.Create}
|
||||
component={CreateSongs}
|
||||
options={{ headerShown: false }}
|
||||
|
||||
@@ -58,6 +58,8 @@ import ChangeEmailAddress from "../screens/Profile/ChangeEmailAddress";
|
||||
import ChangePassword from "../screens/Profile/ChangePassword";
|
||||
import Language from "../screens/Profile/Language";
|
||||
import Reels from "../screens/Profile/Reels";
|
||||
import Follows from "../screens/Profile/Follows";
|
||||
import NewMusicOptions from "../screens/NewMusicOptions";
|
||||
import Register from "../screens/Register";
|
||||
import CreatePassword from "../screens/CreatePassword";
|
||||
import CreatePseudo from "../screens/CreatePseudo";
|
||||
@@ -255,6 +257,14 @@ const screens = [
|
||||
name: Routes.Settings,
|
||||
component: Settings,
|
||||
},
|
||||
{
|
||||
name: Routes.Follows,
|
||||
component: Follows,
|
||||
},
|
||||
{
|
||||
name: Routes.FlowSelection,
|
||||
component: NewMusicOptions,
|
||||
},
|
||||
{
|
||||
name: Routes.ChangeEmailAddress,
|
||||
component: ChangeEmailAddress,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { setGlobal } from "reactn";
|
||||
import { StackActions } from "@react-navigation/native";
|
||||
|
||||
import { isDesktop } from "../hooks/useLayoutType";
|
||||
import { Routes } from "./Routes";
|
||||
@@ -9,6 +10,16 @@ export function navigate(name, params) {
|
||||
navigationRef.current?.navigate(name, params);
|
||||
}
|
||||
|
||||
export function push(name, params) {
|
||||
if (!navigationRef.current) return;
|
||||
try {
|
||||
navigationRef.current.dispatch(StackActions.push(name, params));
|
||||
} catch (e) {
|
||||
// Fallback to navigate if push not available
|
||||
navigationRef.current?.navigate?.(name, params);
|
||||
}
|
||||
}
|
||||
|
||||
export function dispatch(route) {
|
||||
navigationRef.current?.dispatch(route);
|
||||
}
|
||||
|
||||
@@ -79,4 +79,6 @@ export const Routes = {
|
||||
Notifications: "Notifications",
|
||||
Language: "Language",
|
||||
Reels: "Reels",
|
||||
Follows: "Follows",
|
||||
FlowSelection: "FlowSelection",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user