From: xangelo Date: Thu, 31 Aug 2023 21:08:26 +0000 (-0400) Subject: fix: add button that goes back to town from any page X-Git-Tag: v0.3.1~2 X-Git-Url: https://git.xangelo.ca/?a=commitdiff_plain;h=06c0e48c79bbb76ab831114e34f3ecd7dd6a41df;p=risinglegends.git fix: add button that goes back to town from any page --- diff --git a/src/server/views/components/button.ts b/src/server/views/components/button.ts index a6daca0..11a9948 100644 --- a/src/server/views/components/button.ts +++ b/src/server/views/components/button.ts @@ -33,3 +33,11 @@ export function Button(attrs: CoreAttributes & Record, value: strin return ``; } + +export function BackToTown(): string { + return Button({ + 'id': 'back-to-town', + 'hx-get': '/player/explore', + 'hx-target': '#explore' + }, 'Back to Town'); +}