From 06c0e48c79bbb76ab831114e34f3ecd7dd6a41df Mon Sep 17 00:00:00 2001 From: xangelo Date: Thu, 31 Aug 2023 17:08:26 -0400 Subject: [PATCH] fix: add button that goes back to town from any page --- src/server/views/components/button.ts | 8 ++++++++ 1 file changed, 8 insertions(+) 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'); +} -- 2.25.1