Skip to content

Commit 5789bb4

Browse files
committed
fix(router): rename dashboard to overview for clarity
- Update route path from '/dashboard' to '/overview' for better clarity - Rename related route names and references in the router.dart file - Modify corresponding route constants in routes.dart
1 parent 161ab6d commit 5789bb4

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

lib/router/router.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ GoRouter createRouter({
5151

5252
// --- Define Key Paths ---
5353
const authenticationPath = Routes.authentication;
54-
const dashboardPath = Routes.dashboard;
54+
const overviewPath = Routes.overview;
5555
final isGoingToAuth = currentLocation.startsWith(authenticationPath);
5656

5757
// --- Case 1: Unauthenticated User ---
@@ -76,11 +76,11 @@ GoRouter createRouter({
7676
if (isGoingToAuth) {
7777
print(
7878
' Action: Authenticated user on auth path ($currentLocation). '
79-
'Redirecting to $dashboardPath',
79+
'Redirecting to $overviewPath',
8080
);
81-
return dashboardPath;
81+
return overviewPath;
8282
}
83-
// Allow access to other routes (non-auth paths), which should only be dashboard for now
83+
// Allow access to other routes (non-auth paths), which should only be dashboard overview for now
8484
print(
8585
' Action: Allowing navigation to $currentLocation for $appStatus '
8686
'user (non-auth path).',
@@ -133,11 +133,11 @@ GoRouter createRouter({
133133
StatefulShellBranch(
134134
routes: [
135135
GoRoute(
136-
path: Routes.dashboard,
137-
name: Routes.dashboardName,
136+
path: Routes.overview,
137+
name: Routes.overviewName,
138138
builder: (context, state) => const OverviewPage(),
139139
routes: [
140-
// The settings page is a sub-route of the dashboard.
140+
// The settings page is a sub-route of the dashboard overview.
141141
// This allows it to be displayed within the AppShell
142142
// (with sidebar and top bar visible) without adding
143143
// a new item to the main navigation sidebar.

lib/router/routes.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ abstract final class Routes {
3232
/// The name for the verify code page route within the linking flow.
3333
static const String linkingVerifyCodeName = 'linkingVerifyCode';
3434

35-
/// The path for the dashboard page.
36-
static const String dashboard = '/dashboard';
35+
/// The path for the dashboard overview page.
36+
static const String overview = '/overview';
3737

38-
/// The name for the dashboard page route.
39-
static const String dashboardName = 'dashboard';
38+
/// The name for the dashboard overview page route.
39+
static const String overviewName = 'overview';
4040

4141
/// The path for the content management section.
4242
static const String contentManagement = '/content-management';

0 commit comments

Comments
 (0)