Add error handling for organization loading in HomePage
This commit is contained in:
@@ -345,6 +345,17 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
||||
>(
|
||||
listener: (context, state) {
|
||||
if (state is OrganizationLoaded) {
|
||||
// Show errors if present
|
||||
if (state.error != null &&
|
||||
state.error!.isNotEmpty) {
|
||||
ScaffoldMessenger.of(
|
||||
context,
|
||||
).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(state.error!),
|
||||
),
|
||||
);
|
||||
}
|
||||
final orgId =
|
||||
state.selectedOrg?.id ?? '';
|
||||
// Reload file browser when org changes (or when falling back to personal workspace)
|
||||
|
||||
Reference in New Issue
Block a user