Skip to content

Commit

Permalink
externalize stream url for nix
Browse files Browse the repository at this point in the history
  • Loading branch information
emonadeo committed Nov 14, 2023
1 parent 8130705 commit 3f38188
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions ascii.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const STATUS_STREAM_URL = 'https://status.ascii.coffee/api/stream/status';
6 changes: 3 additions & 3 deletions src/layouts/base/header/status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { Collapsible } from '@kobalte/core';
import { Accessor, Component, Match, Switch, createSignal, onMount } from 'solid-js';
import { Output, enumType, object, safeParse, transform } from 'valibot';

import { STATUS_STREAM_URL } from 'ascii.config.ts';

import { BusinessHours } from 'src/components/business_hours.tsx';
import { SvgExpand } from 'src/svg/chevron.tsx';

Expand All @@ -18,8 +20,6 @@ import {
animation_out,
} from './status.css.ts';

const STATUS_STREAM_URL = 'https://status.ascii.coffee/api/stream/status';

const StatusSchema = transform(
object({
Classification: enumType(['on', 'off']),
Expand Down Expand Up @@ -54,7 +54,7 @@ function useStatus(): Accessor<Status | undefined> {
return status;
}

export const Status: Component = function () {
export const Status: Component = function() {
const status = useStatus();

const [forceMount, setForceMount] = createSignal<boolean>(false);
Expand Down

0 comments on commit 3f38188

Please sign in to comment.