From 239f6bcedafa0f3797b89d09765283df12143f4e Mon Sep 17 00:00:00 2001 From: Don Strawsburg Date: Mon, 3 Feb 2025 13:33:15 -0500 Subject: [PATCH] trying to resolve next/font bug --- package-lock.json | 3 ++- package.json | 2 +- src/app/UserProfile/[uuid]/page.tsx | 2 +- src/components/ProductPage/index.tsx | 8 +++++++- src/lib/auth/validate-request.ts | 4 ++-- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6d046fd..44ce40a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -57,7 +57,7 @@ "pg": "^8.13.1", "postgres": "^3.4.5", "prettier": "^3.4.2", - "react": "18.2.0", + "react": "^18.2.0", "react-dom": "18.2.0", "react-icons": "^5.3.0", "sha2": "@oslojs/crypto/sha2", @@ -10016,6 +10016,7 @@ "version": "18.2.0", "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "license": "MIT", "dependencies": { "loose-envify": "^1.1.0" }, diff --git a/package.json b/package.json index 9b2080a..d8fe7d2 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "pg": "^8.13.1", "postgres": "^3.4.5", "prettier": "^3.4.2", - "react": "18.2.0", + "react": "^18.2.0", "react-dom": "18.2.0", "react-icons": "^5.3.0", "sha2": "@oslojs/crypto/sha2", diff --git a/src/app/UserProfile/[uuid]/page.tsx b/src/app/UserProfile/[uuid]/page.tsx index 0fb2c79..3977952 100644 --- a/src/app/UserProfile/[uuid]/page.tsx +++ b/src/app/UserProfile/[uuid]/page.tsx @@ -1,6 +1,6 @@ import { getUserByUUID } from "@actions/userActions"; import { NextPage } from "next"; -import { Herr_Von_Muellerhoff } from "next/font/google"; + export default async function UserProfilePage(props: any) { diff --git a/src/components/ProductPage/index.tsx b/src/components/ProductPage/index.tsx index ed690ec..d52a477 100644 --- a/src/components/ProductPage/index.tsx +++ b/src/components/ProductPage/index.tsx @@ -1,5 +1,11 @@ 'use server' -export const ProductPage = async (props: any) => { +interface ProductPageProps { + data: { + modelnumber: string; + }; +} + +export const ProductPage = async (props: ProductPageProps) => { return (
{props.data.modelnumber} diff --git a/src/lib/auth/validate-request.ts b/src/lib/auth/validate-request.ts index 80441b1..6bae4be 100644 --- a/src/lib/auth/validate-request.ts +++ b/src/lib/auth/validate-request.ts @@ -1,4 +1,4 @@ -import { cache } from "react"; +//import { cache } from "next/cache"; import { cookies } from "next/headers"; import type { Session, User } from "lucia"; import { lucia } from "@/lib/auth"; @@ -37,4 +37,4 @@ export const uncachedValidateRequest = async (): Promise< return result; }; -export const validateRequest = cache(uncachedValidateRequest); +export const validateRequest = uncachedValidateRequest;