diff --git a/src/styles/main.css b/src/styles/main.css
index 3dcc13a..0d21c86 100644
--- a/src/styles/main.css
+++ b/src/styles/main.css
@@ -29,11 +29,9 @@
scrollbar-width: none;
-ms-overflow-style: none;
-webkit-overflow-scrolling: touch;
- height: 100%;
- overflow: hidden;
}
- @supports (-webkit-touch-callout: none) {
+ @media (max-width: 1023px) {
html,
body,
#app {
@@ -41,15 +39,17 @@
overflow: hidden;
}
- .app-shell-root {
- min-height: 100%;
- min-height: -webkit-fill-available;
- }
+ @supports (-webkit-touch-callout: none) {
+ .app-shell-root {
+ min-height: 100%;
+ min-height: -webkit-fill-available;
+ }
- .app-shell-frame {
- height: 100%;
- max-height: 100%;
- min-height: -webkit-fill-available;
+ .app-shell-frame {
+ height: 100%;
+ max-height: 100%;
+ min-height: -webkit-fill-available;
+ }
}
}
@@ -88,7 +88,5 @@
#app {
min-height: 100dvh;
- height: 100%;
- overflow: hidden;
}
}
diff --git a/src/utils/auth-redirect.ts b/src/utils/auth-redirect.ts
index 3840e7b..afda856 100644
--- a/src/utils/auth-redirect.ts
+++ b/src/utils/auth-redirect.ts
@@ -17,3 +17,26 @@ export function loginRouteWithRedirect(redirectPath: string) {
query: { redirect: redirectPath },
};
}
+
+export function businessBookingPath(businessId: string, hash?: string) {
+ const normalizedHash = hash?.replace(/^#/, '');
+ const base = `/app/businesses/${businessId}`;
+ return normalizedHash ? `${base}#${normalizedHash}` : base;
+}
+
+export function bookingDestination(
+ businessId: string,
+ isLoggedIn: boolean,
+ hash?: string,
+) {
+ if (!isLoggedIn) {
+ return loginRouteWithRedirect(businessBookingPath(businessId, hash));
+ }
+
+ const normalizedHash = hash?.replace(/^#/, '');
+ return {
+ name: 'app-business-detail' as const,
+ params: { id: businessId },
+ ...(normalizedHash ? { hash: normalizedHash } : {}),
+ };
+}
diff --git a/src/views/app/AppHomeView.vue b/src/views/app/AppHomeView.vue
index b9ab4a1..c871f68 100644
--- a/src/views/app/AppHomeView.vue
+++ b/src/views/app/AppHomeView.vue
@@ -47,6 +47,7 @@ import { useAuthStore } from '@/stores/auth';
import { useTenantStore } from '@/stores/tenant';
import type { LandingServiceItem } from '@/types/landing';
import { fetchLandingServices } from '@/utils/landing-services';
+import { bookingDestination } from '@/utils/auth-redirect';
const isDesktop = useMediaQuery('(min-width: 1024px)');
const router = useRouter();
@@ -96,10 +97,7 @@ function goToBooking() {
const id = tenant.singleBusinessId;
if (!id) return;
- void router.push({
- name: 'app-business-detail',
- params: { id },
- });
+ void router.push(bookingDestination(id, auth.isLoggedIn));
}
watch(showSingleBusinessLanding, (show) => {