Skip to content

Commit

Permalink
fix: search/ai queries not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
drew-harris authored and cdxker committed Oct 29, 2024
1 parent a729c5f commit c61da81
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion frontends/dashboard/src/pages/dataset/PublicPageSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const PublicPageSettings = () => {
string | null
>(null);
const [isPublic, setisPublic] = createSignal<boolean>(false);
const [hasLoaded, setHasLoaded] = createSignal(false);

const { datasetId } = useContext(DatasetContext);
const { selectedOrg } = useContext(UserContext);
Expand Down Expand Up @@ -52,6 +53,7 @@ export const PublicPageSettings = () => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument
dataset.server_configuration?.PUBLIC_DATASET.extra_params,
);
setHasLoaded(true);
});
};

Expand Down Expand Up @@ -164,7 +166,7 @@ export const PublicPageSettings = () => {
/>
</div>
</Show>
<Show when={isPublic()}>
<Show when={isPublic() && hasLoaded()}>
<div class="mt-4 flex content-center items-center gap-1.5 gap-x-3">
<span class="font-medium">Published Url:</span>{" "}
<a class="text-magenta-400" href={publicUrl()}>
Expand Down
4 changes: 2 additions & 2 deletions server/src/public/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@
{% if params.defaultSearchQueries -%}
defaultSearchQueries={{ params.defaultSearchQueries }}
{% endif -%}
{% if params.defaultAiQueestions -%}
defaultAiQueestions={{ params.defaultAiQuestions }}
{% if params.defaultAiQuestions -%}
defaultAiQuestions={{ params.defaultAiQuestions }}
{% endif -%}
/&gt;
);
Expand Down

0 comments on commit c61da81

Please sign in to comment.