chore: push current project state to new repository
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
32049d90bd
commit
dd672f39f5
@@ -0,0 +1,20 @@
|
||||
import { createNavigationContainerRef, CommonActions } from '@react-navigation/native';
|
||||
|
||||
export const navigationRef = createNavigationContainerRef<any>();
|
||||
|
||||
export function navigate(name: string, params?: any) {
|
||||
if (navigationRef.isReady()) {
|
||||
navigationRef.navigate(name, params);
|
||||
}
|
||||
}
|
||||
|
||||
export function resetAndNavigate(name: string) {
|
||||
if (navigationRef.isReady()) {
|
||||
navigationRef.dispatch(
|
||||
CommonActions.reset({
|
||||
index: 0,
|
||||
routes: [{ name }],
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user