Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
erich2s committed Oct 28, 2023
1 parent 0d27e4c commit 8dc2da6
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 37 deletions.
6 changes: 4 additions & 2 deletions src/components/admin/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export default function Map() {
</Tooltip>
</TooltipProvider>
)}

<div
ref={mapRef}
id="main-map"
Expand All @@ -160,11 +161,12 @@ export default function Map() {
window.map.setRotation(window.map.getRotation() + 45);
}
}}
>
></div>
{mapLoaded ? null : (
<div className="flex h-full w-full items-center justify-center">
<Spinner />
</div>
</div>
)}
</>
);
}
65 changes: 30 additions & 35 deletions src/components/ui/sheet.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
"use client";
"use client"

import * as React from "react";
import * as SheetPrimitive from "@radix-ui/react-dialog";
import { cva, type VariantProps } from "class-variance-authority";
import { X } from "lucide-react";
import * as React from "react"
import * as SheetPrimitive from "@radix-ui/react-dialog"
import { cva, type VariantProps } from "class-variance-authority"
import { X } from "lucide-react"

import { cn } from "@/lib/utils";
import { motion } from "framer-motion";
import { cn } from "@/lib/utils"

const Sheet = SheetPrimitive.Root;
const Sheet = SheetPrimitive.Root

const SheetTrigger = SheetPrimitive.Trigger;
const SheetTrigger = SheetPrimitive.Trigger

const SheetClose = SheetPrimitive.Close;
const SheetClose = SheetPrimitive.Close

const SheetPortal = ({
className,
...props
}: SheetPrimitive.DialogPortalProps) => (
<SheetPrimitive.Portal className={cn(className)} {...props} />
);
SheetPortal.displayName = SheetPrimitive.Portal.displayName;
const SheetPortal = SheetPrimitive.Portal

const SheetOverlay = React.forwardRef<
React.ElementRef<typeof SheetPrimitive.Overlay>,
Expand All @@ -29,13 +22,13 @@ const SheetOverlay = React.forwardRef<
<SheetPrimitive.Overlay
className={cn(
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
className,
className
)}
{...props}
ref={ref}
/>
));
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
))
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName

const sheetVariants = cva(
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
Expand All @@ -53,8 +46,8 @@ const sheetVariants = cva(
defaultVariants: {
side: "right",
},
},
);
}
)

interface SheetContentProps
extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
Expand All @@ -78,8 +71,8 @@ const SheetContent = React.forwardRef<
</SheetPrimitive.Close>
</SheetPrimitive.Content>
</SheetPortal>
));
SheetContent.displayName = SheetPrimitive.Content.displayName;
))
SheetContent.displayName = SheetPrimitive.Content.displayName

const SheetHeader = ({
className,
Expand All @@ -88,12 +81,12 @@ const SheetHeader = ({
<div
className={cn(
"flex flex-col space-y-2 text-center sm:text-left",
className,
className
)}
{...props}
/>
);
SheetHeader.displayName = "SheetHeader";
)
SheetHeader.displayName = "SheetHeader"

const SheetFooter = ({
className,
Expand All @@ -102,12 +95,12 @@ const SheetFooter = ({
<div
className={cn(
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
className,
className
)}
{...props}
/>
);
SheetFooter.displayName = "SheetFooter";
)
SheetFooter.displayName = "SheetFooter"

const SheetTitle = React.forwardRef<
React.ElementRef<typeof SheetPrimitive.Title>,
Expand All @@ -118,8 +111,8 @@ const SheetTitle = React.forwardRef<
className={cn("text-lg font-semibold text-foreground", className)}
{...props}
/>
));
SheetTitle.displayName = SheetPrimitive.Title.displayName;
))
SheetTitle.displayName = SheetPrimitive.Title.displayName

const SheetDescription = React.forwardRef<
React.ElementRef<typeof SheetPrimitive.Description>,
Expand All @@ -130,16 +123,18 @@ const SheetDescription = React.forwardRef<
className={cn("text-sm text-muted-foreground", className)}
{...props}
/>
));
SheetDescription.displayName = SheetPrimitive.Description.displayName;
))
SheetDescription.displayName = SheetPrimitive.Description.displayName

export {
Sheet,
SheetPortal,
SheetOverlay,
SheetTrigger,
SheetClose,
SheetContent,
SheetHeader,
SheetFooter,
SheetTitle,
SheetDescription,
};
}

0 comments on commit 8dc2da6

Please sign in to comment.