usar inject en vez de hackily replace
This commit is contained in:
parent
3a2aad4d23
commit
dc99cbfb9e
1 changed files with 5 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
|||
<script lang="ts">
|
||||
import { inject } from "regexparam";
|
||||
import { loadWorlds } from "../lib/worldStorage";
|
||||
import { routes } from "../lib/routes";
|
||||
|
||||
|
@ -13,10 +14,10 @@
|
|||
{#each worlds as world}
|
||||
<li>
|
||||
<a
|
||||
href={routes.Page.replace(":worldId", world.room).replace(
|
||||
":pageId",
|
||||
"index"
|
||||
)}>{world.room}</a
|
||||
href={inject(routes.Page, {
|
||||
worldId: world.room,
|
||||
pageId: "index",
|
||||
})}>{world.room}</a
|
||||
>
|
||||
</li>
|
||||
{/each}
|
||||
|
|
Loading…
Reference in a new issue