Skip to content

Commit f65942b

Browse files
committed
fix: nav bar hidden under alert.
1 parent cc954b8 commit f65942b

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

src/routes/(console)/organization-[organization]/enterpriseTrial.svelte

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,14 @@
44
import { organization } from '$lib/stores/organization';
55
import { calculateEnterpriseTrial, hideBillingHeaderRoutes } from '$lib/stores/billing';
66
import { base } from '$app/paths';
7-
8-
import { onDestroy, onMount } from 'svelte';
97
import { isTabletViewport } from '$lib/stores/viewport';
108
import GradientBanner from '$lib/components/billing/gradientBanner.svelte';
119
import { Layout, Typography } from '@appwrite.io/pink-svelte';
1210
13-
let container: HTMLElement | null = null;
14-
15-
function setNavigationHeight() {
16-
const alertHeight = container ? container.getBoundingClientRect().height : 0;
17-
const header: HTMLHeadingElement = document.querySelector('main > header');
18-
const sidebar: HTMLElement = document.querySelector('main > div > nav');
19-
const contentSection: HTMLElement = document.querySelector('main > div > section');
20-
21-
if (header) {
22-
header.style.top = `${alertHeight}px`;
23-
}
24-
if (sidebar) {
25-
sidebar.style.top = `${alertHeight + ($isTabletViewport ? 0 : header.getBoundingClientRect().height)}px`;
26-
sidebar.style.height = `calc(100vh - (${alertHeight + ($isTabletViewport ? 0 : header.getBoundingClientRect().height)}px))`;
27-
}
28-
if (contentSection) {
29-
contentSection.style.paddingBlockStart = `${alertHeight}px`;
30-
}
31-
}
32-
33-
onMount(() => {
34-
setNavigationHeight();
35-
});
36-
37-
onDestroy(() => {
38-
container = null;
39-
setNavigationHeight();
40-
});
41-
4211
$: upgradeUrl = `${base}/organization-${$organization?.$id}/change-plan`;
4312
$: remainingDays = calculateEnterpriseTrial($organization);
4413
</script>
4514

46-
<svelte:window on:resize={setNavigationHeight} />
4715
{#if $organization?.$id && remainingDays > 0 && !hideBillingHeaderRoutes.includes(page.url.pathname)}
4816
<GradientBanner>
4917
<Layout.Stack

0 commit comments

Comments
 (0)