mirror of
https://github.com/ajnart/homarr.git
synced 2026-02-01 04:09:12 +01:00
* feat(board): add mobile home board * fix: add missing translations * fix: mysql key reference with other datatype * fix: format issue * fix: missing trpc context arguments in tests * fix: missing trpc context arguments in tests
12 lines
467 B
TypeScript
12 lines
467 B
TypeScript
import { userAgent as userAgentNextServer } from "next/server";
|
|
|
|
import type { Modify } from "./types";
|
|
|
|
export const userAgent = (headers: Headers) => {
|
|
return userAgentNextServer({ headers }) as Omit<ReturnType<typeof userAgentNextServer>, "device"> & {
|
|
device: Modify<ReturnType<typeof userAgentNextServer>["device"], { type: DeviceType }>;
|
|
};
|
|
};
|
|
|
|
export type DeviceType = "console" | "mobile" | "tablet" | "smarttv" | "wearable" | "embedded" | undefined;
|