flotilla/src/app/components/ChannelLink.svelte

22 lines
537 B
Svelte
Raw Normal View History

2025-10-06 18:23:19 +00:00
<script lang="ts">
import cx from "classnames"
import Link from "@lib/components/Link.svelte"
import ChannelName from "@app/components/ChannelName.svelte"
import {makeSpacePath} from "@app/util/routes"
type Props = {
room: string
url: string
class?: string
unstyled?: boolean
}
const {room, url, unstyled, ...props}: Props = $props()
const path = makeSpacePath(url, room)
</script>
<Link href={path} class={cx(props.class, {"link-content bg-alt": !unstyled})}>
#<ChannelName {room} {url} />
</Link>