Skip to content

Commit

Permalink
uses RILL_RUNTIME_URL in top-level +layout.svelte of web-local (#…
Browse files Browse the repository at this point in the history
…1953)

* uses RILL_RUNTIME_URL in top-level +layout.svelte

* add global def

* moves to templated ts runtime url

* remove comment

* fixes empty string comparison issue
  • Loading branch information
hamilton authored Mar 16, 2023
1 parent 5677da5 commit baed98c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web-common/src/runtime-client/RuntimeProvider.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
$: host && invalidateRuntimeQueries(queryClient);
</script>

{#if $runtime.host && $runtime.instanceId}
{#if $runtime.host !== undefined && $runtime.instanceId}
<slot />
{/if}
3 changes: 2 additions & 1 deletion web-local/src/routes/(application)/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<script lang="ts">
import { RillDeveloperLayout } from "@rilldata/web-common/layout";
import RuntimeProvider from "@rilldata/web-common/runtime-client/RuntimeProvider.svelte";
import { RuntimeUrl } from "@rilldata/web-local/lib/application-state-stores/initialize-node-store-contexts";
import { QueryClientProvider } from "@sveltestack/svelte-query";
import { createQueryClient } from "../../lib/svelte-query/globalQueryClient";
const queryClient = createQueryClient();
</script>

<QueryClientProvider client={queryClient}>
<RuntimeProvider host="http://localhost:9009" instanceId="default">
<RuntimeProvider host={RuntimeUrl} instanceId="default">
<RillDeveloperLayout>
<slot />
</RillDeveloperLayout>
Expand Down

0 comments on commit baed98c

Please sign in to comment.