Skip to content

Commit 79349bb

Browse files
committed
fix basepath in map page for back to dashboard
Signed-off-by: Falah Naufal Zaki <falahnzk.dev@gmail.com>
1 parent 77960b0 commit 79349bb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/map/page.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,10 @@ export default function RobotMapWithHeading() {
117117
<div className="flex items-center gap-4">
118118
{/* Back Button */}
119119
<button
120-
onClick={() => (window.location.href = "/")}
120+
onClick={() => {
121+
const basePath = window.location.hostname === "localhost" ? "/" : "/altair_dashboard";
122+
window.location.href = basePath;
123+
}}
121124
className="flex items-center gap-2 px-3 py-2 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors duration-200"
122125
>
123126
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
@@ -155,7 +158,7 @@ export default function RobotMapWithHeading() {
155158
className="relative w-full h-[600px] bg-gray-100 rounded-lg border border-gray-200 overflow-hidden"
156159
>
157160
<Image
158-
src="/map.png"
161+
src="map.png"
159162
alt="Map"
160163
fill
161164
className="object-contain pointer-events-none"

0 commit comments

Comments
 (0)