fix: pull page redirect

This commit is contained in:
Rongjian Zhang 2022-10-06 15:16:44 +08:00
parent 61d5a3e846
commit 7b51747576
1 changed files with 15 additions and 22 deletions

View File

@ -253,32 +253,25 @@ final router = GoRouter(
),
),
GoRoute(
path: 'pull',
redirect: (_, state) =>
'/github/${state.params['owner']!}/${state.params['name']!}/pulls',
path: 'pull/:number',
builder: (context, state) => GhIssueScreen(
state.params['owner']!,
state.params['name']!,
int.parse(state.params['number']!),
),
routes: [
GoRoute(
path: ':number',
builder: (context, state) => GhIssueScreen(
state.params['owner']!,
state.params['name']!,
int.parse(state.params['number']!),
),
routes: [
GoRoute(
path: 'files',
builder: (context, state) {
return GhFilesScreen(
state.params['owner']!,
state.params['name']!,
int.parse(state.params['number']!),
);
},
),
],
path: 'files',
builder: (context, state) {
return GhFilesScreen(
state.params['owner']!,
state.params['name']!,
int.parse(state.params['number']!),
);
},
),
],
)
),
],
),
],