mirror of
https://github.com/coracle-social/flotilla.git
synced 2025-12-10 10:57:04 +00:00
Simplify room create permission derive
This commit is contained in:
committed by
Jon Staab
parent
69e3ee0aff
commit
a636ae6592
@@ -43,7 +43,6 @@
|
||||
import {notifications} from "@app/util/notifications"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {makeSpacePath} from "@app/util/routes"
|
||||
import {get} from "svelte/store"
|
||||
|
||||
const {url} = $props()
|
||||
|
||||
@@ -71,7 +70,7 @@
|
||||
{replaceState},
|
||||
)
|
||||
|
||||
const canCreateRoom = get<boolean>(deriveUserCanCreateRoom(url))
|
||||
const canCreateRoom = deriveUserCanCreateRoom(url)
|
||||
|
||||
const createInvite = () => pushModal(SpaceInvite, {url}, {replaceState})
|
||||
|
||||
@@ -189,7 +188,7 @@
|
||||
{#each $otherRooms as room, i (room)}
|
||||
<MenuSpaceRoomItem {replaceState} {url} {room} />
|
||||
{/each}
|
||||
{#if canCreateRoom}
|
||||
{#if $canCreateRoom}
|
||||
<SecondaryNavItem {replaceState} onclick={addRoom}>
|
||||
<Icon icon={AddCircle} />
|
||||
Create room
|
||||
|
||||
Reference in New Issue
Block a user