diff --git a/Dockerfile b/Dockerfile index 39887e465..ddde77fc5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,7 +42,7 @@ RUN set -x \ && apk add --no-cache curl # Script dependencies -RUN pnpm add npm-run-all dotenv chalk semver prisma@6.18.0 @prisma/adapter-pg@6.18.0 +RUN pnpm add npm-run-all dotenv chalk semver prisma@6.16.3 @prisma/adapter-pg@6.16.3 # Permissions for prisma RUN chown -R nextjs:nodejs node_modules/.pnpm/ diff --git a/src/lib/detect.ts b/src/lib/detect.ts index c5528465d..16ff97da2 100644 --- a/src/lib/detect.ts +++ b/src/lib/detect.ts @@ -30,18 +30,10 @@ const PROVIDER_HEADERS = [ }, ]; -export function getDevice(userAgent: string, screen: string = '') { +export function getDevice(userAgent: string) { const { device } = UAParser(userAgent); - const [width] = screen.split('x'); - - const type = device?.type || 'desktop'; - - if (type === 'desktop' && screen && +width <= 1920) { - return 'laptop'; - } - - return type; + return device?.type || 'desktop'; } function getRegionCode(country: string, region: string) { @@ -116,7 +108,7 @@ export async function getClientInfo(request: Request, payload: Record