Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🔥 Remove unecessary use of react cache
Luke Vella20bf8e8ee380
diff --git a/apps/web/src/features/user/data.ts b/apps/web/src/features/user/data.tsindex 0c2a91407..0a014d4f4 100644--- a/apps/web/src/features/user/data.ts+++ b/apps/web/src/features/user/data.ts@@ -1,6 +1,5 @@import type { User } from "@rallly/database";import { prisma } from "@rallly/database";-import { cache } from "react";import type { UserDTO } from "@/features/user/schema";import { getSession } from "@/lib/auth";@@ -52,7 +51,7 @@ export const getUser = async (id: string) => {return createUserDTO(user);};-export const getUserSession = cache(async () => {+export const getUserSession = async () => {const session = await getSession();if (!session?.user) {@@ -64,4 +63,4 @@ export const getUserSession = cache(async () => {: ((await getUser(session.user.id)) ?? undefined);return { session, user };-});+};