Migrating followStates and followRoles from a const object to a type restricted to only the string values allowed.
This allows for more secure code (compilation checks) and simpler code too (we can pass strings instead of const values)
This commit is contained in:
parent
840f8626ad
commit
d37165219c
5 changed files with 46 additions and 69 deletions
|
@ -42,7 +42,7 @@
|
|||
import AudioManager from "./AudioManager/AudioManager.svelte";
|
||||
import { showReportScreenStore, userReportEmpty } from "../Stores/ShowReportScreenStore";
|
||||
import ReportMenu from "./ReportMenu/ReportMenu.svelte";
|
||||
import { followStateStore, followStates } from "../Stores/FollowStore";
|
||||
import { followStateStore } from "../Stores/FollowStore";
|
||||
import { peerStore } from "../Stores/PeerStore";
|
||||
import FollowMenu from "./FollowMenu/FollowMenu.svelte";
|
||||
|
||||
|
@ -104,7 +104,7 @@
|
|||
<ReportMenu />
|
||||
</div>
|
||||
{/if}
|
||||
{#if $followStateStore !== followStates.off || $peerStore.size > 0}
|
||||
{#if $followStateStore !== "off" || $peerStore.size > 0}
|
||||
<div>
|
||||
<FollowMenu />
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue