Make the action var in Issue.svelte reactive to the httpd state

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
Sebastian Martinez
2023-07-04 14:14:29 +02:00
parent 0cd42908e5
commit d91591c908
+2 -1
View File
@@ -32,7 +32,8 @@
const rawPath = utils.getRawBasePath(projectId, baseUrl, projectHead);
const api = new HttpdClient(baseUrl);
const action: "create" | "edit" | "view" =
let action: "edit" | "view";
$: action =
$httpdStore.state === "authenticated" && utils.isLocal(baseUrl.hostname)
? "edit"
: "view";