2023-04-18 15:08:46 +00:00
|
|
|
<script>
|
|
|
|
import { inject } from "regexparam";
|
|
|
|
import { getWorldY } from "../lib/doc";
|
|
|
|
import { titleStore } from "../lib/titleStore";
|
|
|
|
import { routes } from "../lib/routes";
|
|
|
|
|
|
|
|
/** @type {import("../lib/doc").WorldIdentifier} */
|
|
|
|
export let world;
|
2023-08-28 13:51:20 +00:00
|
|
|
/** @type {string} */
|
|
|
|
export let className = "";
|
2023-04-18 15:08:46 +00:00
|
|
|
|
|
|
|
$: title = titleStore(getWorldY(world).ydoc, "page/index");
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<a
|
2023-08-28 13:51:20 +00:00
|
|
|
class={className}
|
2023-04-18 15:08:46 +00:00
|
|
|
href={inject(routes.Page, {
|
|
|
|
worldId: world.room,
|
|
|
|
pageId: "index",
|
|
|
|
})}>{$title || world.room}</a
|
|
|
|
>
|