Skip to content

Commit 4de6a24

Browse files
committed
fix: weird scrolly issue on mobile
1 parent db1cd15 commit 4de6a24

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

apps/dashboard/app/(main)/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default function MainLayout({
2121
<div className="h-screen overflow-hidden text-foreground">
2222
<Sidebar />
2323
<div className="relative h-screen pt-16 md:pl-64">
24-
<div className="h-[calc(100vh-4rem)] overflow-y-scroll">
24+
<div className="h-[calc(100vh-4rem)] overflow-y-auto overflow-x-hidden">
2525
{children}
2626
</div>
2727
</div>

apps/dashboard/app/(main)/websites/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export default function WebsitesPage() {
189189
weight="fill"
190190
/>
191191
</div>
192-
<div>
192+
<div className="min-w-0 flex-1">
193193
<h1 className="truncate font-bold text-foreground text-xl tracking-tight sm:text-2xl">
194194
Websites
195195
</h1>
@@ -213,7 +213,7 @@ export default function WebsitesPage() {
213213
</Button>
214214
<Button
215215
className={cn(
216-
'w-full gap-2 px-6 py-3 font-medium sm:w-auto',
216+
'gap-2 px-3 py-2 font-medium sm:px-4 sm:py-2',
217217
'bg-gradient-to-r from-primary to-primary/90 hover:from-primary/90 hover:to-primary',
218218
'group relative overflow-hidden shadow-lg transition-all duration-300 hover:shadow-xl'
219219
)}
@@ -243,7 +243,7 @@ export default function WebsitesPage() {
243243
size={24}
244244
weight="duotone"
245245
/>
246-
<span>
246+
<span className="truncate">
247247
Tracking{' '}
248248
<span className="font-medium text-foreground">
249249
{websites.length}

apps/dashboard/components/website-dialog.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { LoaderCircle } from 'lucide-react';
66
import { useEffect, useRef } from 'react';
77
import { useForm } from 'react-hook-form';
88
import { toast } from 'sonner';
9-
import * as z from 'zod';
9+
import { z } from 'zod';
1010
import { Button } from '@/components/ui/button';
1111
import {
1212
Dialog,
@@ -108,7 +108,7 @@ export function WebsiteDialog({
108108

109109
return (
110110
<Dialog onOpenChange={onOpenChange} open={open}>
111-
<DialogContent>
111+
<DialogContent className="w-[95vw] max-w-md sm:w-full">
112112
<DialogHeader>
113113
<DialogTitle>
114114
{isEditing ? 'Edit Website' : 'Create a new website'}
@@ -180,6 +180,7 @@ export function WebsiteDialog({
180180
</Form>
181181
<DialogFooter>
182182
<Button
183+
className="w-full sm:w-auto"
183184
disabled={
184185
createWebsiteMutation.isPending || updateWebsiteMutation.isPending
185186
}

0 commit comments

Comments
 (0)