feat(board): add mobile home board (#1910)
* 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
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
export * from "./security";
|
||||
export * from "./encryption";
|
||||
export * from "./user-agent";
|
||||
|
||||
11
packages/common/src/user-agent.ts
Normal file
11
packages/common/src/user-agent.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user