diff --git a/Dockerfile b/Dockerfile index 76be1065e..034d2de98 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,6 @@ FROM base AS release COPY --from=build /src/node_modules /src/node_modules COPY --from=build /src/app/database /src/app/database COPY --from=build /src/build /src/build -COPY --from=build /src/public /src/public COPY --from=build /src/package.json /src/package.json COPY --from=build /src/start.sh /src/start.sh RUN chmod +x /src/start.sh diff --git a/Dockerfile.image b/Dockerfile.image index 8c68f17cc..38809ea00 100644 --- a/Dockerfile.image +++ b/Dockerfile.image @@ -35,7 +35,6 @@ FROM base AS release COPY --from=build /src/node_modules /src/node_modules COPY --from=build /src/app/database /src/app/database COPY --from=build /src/build /src/build -COPY --from=build /src/public /src/public COPY --from=build /src/package.json /src/package.json COPY --from=build /src/docker-entrypoint.sh /src/docker-entrypoint.sh diff --git a/app/components/forms/calendar-input.tsx b/app/components/forms/calendar-input.tsx index 512655521..8881d9fbb 100644 --- a/app/components/forms/calendar-input.tsx +++ b/app/components/forms/calendar-input.tsx @@ -1,5 +1,3 @@ -"use client"; - import { ChevronLeftIcon, ChevronRightIcon } from "@radix-ui/react-icons"; import { DayPicker } from "react-day-picker"; diff --git a/app/components/forms/select.tsx b/app/components/forms/select.tsx index 89b9e5557..8f66293e9 100644 --- a/app/components/forms/select.tsx +++ b/app/components/forms/select.tsx @@ -1,5 +1,3 @@ -"use client"; - import * as React from "react"; import * as SelectPrimitive from "@radix-ui/react-select"; import { tw } from "~/utils/tw"; diff --git a/app/components/forms/switch.tsx b/app/components/forms/switch.tsx index 341f9fcb5..1be3a9afe 100644 --- a/app/components/forms/switch.tsx +++ b/app/components/forms/switch.tsx @@ -1,5 +1,3 @@ -"use client"; - import * as React from "react"; import * as SwitchPrimitives from "@radix-ui/react-switch"; diff --git a/app/components/location/map.tsx b/app/components/location/map.tsx index eb9e9f546..2208a15dc 100644 --- a/app/components/location/map.tsx +++ b/app/components/location/map.tsx @@ -1,6 +1,7 @@ import maplibregl from "maplibre-gl"; import { Marker, ScaleControl } from "react-map-gl"; -import Map from "react-map-gl/maplibre"; +// https://github.com/visgl/react-map-gl/issues/2272 +import Map from "react-map-gl/dist/es5/exports-maplibre.js"; import { ClientOnly } from "remix-utils/client-only"; export const ShelfMap = ({ diff --git a/app/components/location/scan-details.tsx b/app/components/location/scan-details.tsx index 073423ba2..3267a7b74 100644 --- a/app/components/location/scan-details.tsx +++ b/app/components/location/scan-details.tsx @@ -36,8 +36,8 @@ export function ScanDetails() {
Date/Time: {lastScan.dateTime}
Device:{" "} - {lastScan.ua.device.name - ? lastScan.ua.device.name + {lastScan.ua.device.model && lastScan.ua.device.vendor + ? `${lastScan.ua.device.vendor} - ${lastScan.ua.device.model}` : "Unknown device"}
Browser: {lastScan.ua.browser.name}
diff --git a/app/components/shared/dropdown.tsx b/app/components/shared/dropdown.tsx index 3b61018f7..ba6014e78 100644 --- a/app/components/shared/dropdown.tsx +++ b/app/components/shared/dropdown.tsx @@ -1,5 +1,3 @@ -"use client"; - import * as React from "react"; import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"; // import { Check, ChevronRight, Circle } from "lucide-react"; diff --git a/app/components/shared/hover-card.tsx b/app/components/shared/hover-card.tsx index fec5b6e3d..13934506a 100644 --- a/app/components/shared/hover-card.tsx +++ b/app/components/shared/hover-card.tsx @@ -1,5 +1,3 @@ -"use client"; - import * as React from "react"; import * as HoverCardPrimitive from "@radix-ui/react-hover-card"; import { tw } from "~/utils/tw"; diff --git a/app/components/shared/modal.tsx b/app/components/shared/modal.tsx index a75cb1e6f..b64cb4113 100644 --- a/app/components/shared/modal.tsx +++ b/app/components/shared/modal.tsx @@ -1,5 +1,3 @@ -"use client"; - import * as React from "react"; import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"; import { tw } from "~/utils/tw"; diff --git a/app/components/shared/tabs.tsx b/app/components/shared/tabs.tsx index a8a08f26b..5f94becd9 100644 --- a/app/components/shared/tabs.tsx +++ b/app/components/shared/tabs.tsx @@ -1,5 +1,3 @@ -"use client"; - import * as React from "react"; import * as TabsPrimitive from "@radix-ui/react-tabs"; import { tw } from "~/utils/tw"; diff --git a/app/modules/scan/utils.server.ts b/app/modules/scan/utils.server.ts index 2c0a90d26..c1bb440d0 100644 --- a/app/modules/scan/utils.server.ts +++ b/app/modules/scan/utils.server.ts @@ -1,7 +1,7 @@ -import type { Scan } from ".prisma/client"; +import type { Scan } from "@prisma/client"; +import parser from "ua-parser-js"; import { getDateTimeFormat } from "~/utils/client-hints"; import { ShelfError } from "~/utils/error"; -var parser = require("ua-parser-js"); export function parseScanData({ scan, @@ -26,7 +26,7 @@ export function parseScanData({ : "Unknown location"; const dateTime = getDateTimeFormat(request).format(scan.createdAt); - const ua = parser(scan.userAgent); + const ua = parser(scan.userAgent || ""); return { scannedBy, diff --git a/app/modules/user/service.server.test.ts b/app/modules/user/service.server.test.ts index 695912476..da8811eab 100644 --- a/app/modules/user/service.server.test.ts +++ b/app/modules/user/service.server.test.ts @@ -26,7 +26,7 @@ import { // 👋 see https://vitest.dev/guide/environment.html#environments-for-specific-files // mock db -vitest.mock("~/database", () => ({ +vitest.mock("~/database/db.server", () => ({ db: { $transaction: vitest.fn().mockImplementation((callback) => callback(db)), user: { diff --git a/app/root.tsx b/app/root.tsx index 0f2e4969e..9fa08b97e 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -9,7 +9,6 @@ import { json } from "@remix-run/node"; import { Link, Links, - LiveReload, Meta, Outlet, Scripts, @@ -22,9 +21,9 @@ import { ErrorContent } from "./components/errors"; import { HomeIcon } from "./components/icons/library"; import MaintenanceMode from "./components/layout/maintenance-mode"; import { Clarity } from "./components/marketing/clarity"; -import fontsStylesheetUrl from "./styles/fonts.css"; -import globalStylesheetUrl from "./styles/global.css"; -import styles from "./tailwind.css"; +import fontsStylesheetUrl from "./styles/fonts.css?url"; +import globalStylesheetUrl from "./styles/global.css?url"; +import styles from "./tailwind.css?url"; import { ClientHintCheck, getHints } from "./utils/client-hints"; import { getBrowserEnv } from "./utils/env"; import { data } from "./utils/http.server"; @@ -97,7 +96,6 @@ function Document({ children, title }: PropsWithChildren<{ title?: string }>) { }} />