feat(app): React Navigation shell and i18next setup
- React Navigation 7: conditional root stack (Auth | Main | Repository | Settings | Accounts modal), 5 bottom tabs with nested native stacks - typed param lists, deep-link config, header options, root-nav helper - providers: gesture handler, safe area, theme, persisted query client, app lock - i18next + expo-localization (en/nl), persisted language preference
This commit is contained in:
1 parent
08229fdf86
commit
ad81db07b3
17 files changed
+1500
No files matched your search
@@ -0,0 +1,78 @@
|
||||
/**
|
||||
* React Navigation param lists. Every `useNavigation` / `useRoute` in the app
|
||||
* is typed against these — adding a screen means adding it here first.
|
||||
*/
|
||||
|
||||
import type { NavigatorScreenParams } from '@react-navigation/native';
|
||||
|
||||
export type AuthStackParamList = {
|
||||
Welcome: undefined;
|
||||
Connect: { baseUrl?: string } | undefined;
|
||||
};
|
||||
|
||||
export type HomeStackParamList = {
|
||||
Home: undefined;
|
||||
};
|
||||
|
||||
export type RepositoriesStackParamList = {
|
||||
RepositoryList: undefined;
|
||||
};
|
||||
|
||||
export type IssuesStackParamList = {
|
||||
Issues: undefined;
|
||||
};
|
||||
|
||||
export type PullsStackParamList = {
|
||||
PullRequests: undefined;
|
||||
};
|
||||
|
||||
export type InboxStackParamList = {
|
||||
Inbox: undefined;
|
||||
};
|
||||
|
||||
export type MainTabParamList = {
|
||||
HomeTab: NavigatorScreenParams<HomeStackParamList>;
|
||||
RepositoriesTab: NavigatorScreenParams<RepositoriesStackParamList>;
|
||||
IssuesTab: NavigatorScreenParams<IssuesStackParamList>;
|
||||
PullsTab: NavigatorScreenParams<PullsStackParamList>;
|
||||
InboxTab: NavigatorScreenParams<InboxStackParamList>;
|
||||
};
|
||||
|
||||
export type RepositoryStackParamList = {
|
||||
RepoOverview: { owner: string; name: string; ref?: string };
|
||||
Files: { owner: string; name: string; path?: string; ref?: string };
|
||||
FileViewer: { owner: string; name: string; path: string; ref?: string };
|
||||
Commits: { owner: string; name: string; sha?: string; path?: string };
|
||||
CommitDetail: { owner: string; name: string; sha: string };
|
||||
Branches: { owner: string; name: string };
|
||||
Tags: { owner: string; name: string };
|
||||
RepoIssues: { owner: string; name: string };
|
||||
IssueDetail: { owner: string; name: string; index: number };
|
||||
RepoPulls: { owner: string; name: string };
|
||||
PullDetail: { owner: string; name: string; index: number };
|
||||
};
|
||||
|
||||
export type SettingsStackParamList = {
|
||||
Settings: undefined;
|
||||
};
|
||||
|
||||
export type AccountsStackParamList = {
|
||||
Accounts: undefined;
|
||||
AddAccount: { baseUrl?: string } | undefined;
|
||||
};
|
||||
|
||||
export type RootStackParamList = {
|
||||
Auth: NavigatorScreenParams<AuthStackParamList>;
|
||||
Main: NavigatorScreenParams<MainTabParamList>;
|
||||
Repository: NavigatorScreenParams<RepositoryStackParamList>;
|
||||
Settings: NavigatorScreenParams<SettingsStackParamList>;
|
||||
Accounts: NavigatorScreenParams<AccountsStackParamList>;
|
||||
};
|
||||
|
||||
declare global {
|
||||
namespace ReactNavigation {
|
||||
// Empty interface intentionally augments the library's default param list.
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
interface RootParamList extends RootStackParamList {}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user