Refactor router
This commit is contained in:
@@ -7,7 +7,7 @@ bool showDrawerButton(BuildContext context) {
|
||||
if (!useMobileRouter) return true;
|
||||
final String location = GoRouterState.of(context).uri.path;
|
||||
if (location == const HomeRoute().location ||
|
||||
location == const ProfilesRoute().location) return true;
|
||||
location == const ProfilesOverviewRoute().location) return true;
|
||||
if (location.startsWith(const ProxiesRoute().location)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class EmptyActiveProfileHomeBody extends HookConsumerWidget {
|
||||
Text(t.home.noActiveProfileMsg),
|
||||
const Gap(16),
|
||||
OutlinedButton(
|
||||
onPressed: () => const ProfilesRoute().push(context),
|
||||
onPressed: () => const ProfilesOverviewRoute().push(context),
|
||||
child: Text(t.profile.overviewPageTitle),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -90,7 +90,7 @@ class ProfileTile extends HookConsumerWidget {
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
if (isMain) {
|
||||
const ProfilesRoute().go(context);
|
||||
const ProfilesOverviewRoute().go(context);
|
||||
} else {
|
||||
if (selectActiveMutation.state.isInProgress) return;
|
||||
if (profile.active) return;
|
||||
|
||||
Reference in New Issue
Block a user