Skip to content

Commit

Permalink
no condition on schema page on connection error
Browse files Browse the repository at this point in the history
  • Loading branch information
rajatvijay committed Oct 5, 2023
1 parent ce24035 commit fe6c7b6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions mathesar_ui/src/routes/DatabaseRoute.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import ErrorPage from '@mathesar/pages/ErrorPage.svelte';
import { currentDBName, databases } from '@mathesar/stores/databases';
import AppendBreadcrumb from '@mathesar/components/breadcrumb/AppendBreadcrumb.svelte';
import { isSuccessfullyConnectedDatabase } from '@mathesar/utils/database';
import SchemaRoute from './SchemaRoute.svelte';
export let databaseName: string;
Expand All @@ -29,11 +28,9 @@
<DatabasePage {database} />
</Route>

{#if isSuccessfullyConnectedDatabase(database)}
<Route path="/:schemaId/*" let:meta firstmatch>
<SchemaRoute {database} schemaId={parseInt(meta.params.schemaId, 10)} />
</Route>
{/if}
<Route path="/:schemaId/*" let:meta firstmatch>
<SchemaRoute {database} schemaId={parseInt(meta.params.schemaId, 10)} />
</Route>
{:else}
<ErrorPage>
Database with name <Identifier>{databaseName}</Identifier> is not found.
Expand Down

0 comments on commit fe6c7b6

Please sign in to comment.