Skip to content

Commit

Permalink
fix: type issues with next-auth types
Browse files Browse the repository at this point in the history
  • Loading branch information
Meierschlumpf committed Jun 2, 2024
1 parent 6e540f7 commit 004c628
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion apps/nextjs/src/components/user-avatar-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const UserAvatarMenu = ({ children }: UserAvatarMenuProps) => {
<>
<Menu.Item
component={Link}
href={`/manage/users/${session.data?.user.id}`}
href={`/manage/users/${session.data?.user?.id}`}
leftSection={<IconSettings size="1rem" />}
>
{t("preferences")}
Expand Down
6 changes: 3 additions & 3 deletions packages/auth/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { DefaultSession } from "@auth/core/types";
import type { DefaultSession } from "next-auth";

import type { GroupPermissionKey } from "@homarr/definitions";

import { createConfiguration } from "./configuration";

export type { Session } from "@auth/core/types";
export type { Session } from "next-auth";

declare module "@auth/core/types" {
declare module "next-auth" {
interface Session {
user: {
id: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/permissions/board-permissions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Session } from "@auth/core/types";
import type { Session } from "next-auth";

export type BoardPermissionsProps = (
| {
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/permissions/test/board-permissions.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Session } from "@auth/core/types";
import type { Session } from "next-auth";
import { describe, expect, test } from "vitest";

import { getPermissionsWithChildren } from "@homarr/definitions";
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/session.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { randomUUID } from "crypto";
import type { Session } from "@auth/core/types";
import type { Session } from "next-auth";

import type { Database } from "@homarr/db";

Expand Down

0 comments on commit 004c628

Please sign in to comment.