Skip to content

Commit 226e4e2

Browse files
committed
refactor(router): remove demo environment workaround
- Remove special redirect logic for demo environment - Update comment about app startup architecture
1 parent 9fd2c4c commit 226e4e2

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

lib/router/router.dart

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -107,20 +107,7 @@ GoRouter createRouter({
107107
const feedPath = Routes.feed;
108108
final isGoingToAuth = currentLocation.startsWith(authenticationPath);
109109

110-
// --- Workaround for Demo Environment ---
111-
// In the demo environment, the initial auth state from the in-memory
112-
// client might not be emitted before the first redirect check. If the app
113-
// is still in the `initial` state, we explicitly redirect to the
114-
// authentication page to begin the demo flow, avoiding the black screen.
115-
if (appStatus == AppStatus.initial &&
116-
environment == local_config.AppEnvironment.demo) {
117-
print(
118-
' Redirect (Workaround): In demo mode with initial status. Forcing to authentication.',
119-
);
120-
return authenticationPath;
121-
}
122-
123-
// With the new App startup architecture, the router is only active when
110+
// With the current App startup architecture, the router is only active when
124111
// the app is in a stable, running state. The `redirect` function's
125112
// only responsibility is to handle auth-based route protection.
126113
// States like `configFetching`, `underMaintenance`, etc., are now

0 commit comments

Comments
 (0)