Fix responsiveness for tablet

This commit is contained in:
ernstmul committed 2025-02-26 10:11:01 +01:00
1 parent 957c5a637e
commit 2fd4ee4a01
2 files changed
+3 -2

No files matched your search

+2 -2
View File
@@ -6,11 +6,11 @@ export const isTabletViewport = writable(false);
export function updateViewport() {
if (typeof window !== 'undefined') {
isSmallViewport.set(
typeof window !== 'undefined' ? window.matchMedia('(max-width: 768px)').matches : false
typeof window !== 'undefined' ? window.matchMedia('(max-width: 767px)').matches : false
);
isTabletViewport.set(
typeof window !== 'undefined' ? window.matchMedia('(max-width: 1024px)').matches : false
typeof window !== 'undefined' ? window.matchMedia('(max-width: 1023px)').matches : false
);
}
}
@@ -21,6 +21,7 @@
$: selectedCollection = sortedCollections.find((collection) => collection.$id === collectionId);
let openBottomSheet = false;
console.log('isTabletViewport', $isTabletViewport);
</script>
{#if !$isTabletViewport}