From 9a98d913087517e64fb76b7e4bd03d22aa54295c Mon Sep 17 00:00:00 2001 From: Carter Rollins Date: Tue, 15 Oct 2024 15:05:53 -0400 Subject: [PATCH] Small changes --- frontend/app/(dashboard)/tourmaline/layout.tsx | 2 +- frontend/app/admin/layout.tsx | 2 +- frontend/components/Search.tsx | 2 +- server/prisma/schema.prisma | 5 ++--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/frontend/app/(dashboard)/tourmaline/layout.tsx b/frontend/app/(dashboard)/tourmaline/layout.tsx index d588ae2..6274e38 100644 --- a/frontend/app/(dashboard)/tourmaline/layout.tsx +++ b/frontend/app/(dashboard)/tourmaline/layout.tsx @@ -1,4 +1,4 @@ -import { currentUser } from "@clerk/nextjs"; +import { currentUser } from "@clerk/nextjs/server"; import { redirect } from "next/navigation"; export default async function TourmalineLayout({ children }: { children: React.ReactNode }) { diff --git a/frontend/app/admin/layout.tsx b/frontend/app/admin/layout.tsx index 3e73a0a..9ec18fb 100644 --- a/frontend/app/admin/layout.tsx +++ b/frontend/app/admin/layout.tsx @@ -1,4 +1,4 @@ -import { currentUser } from "@clerk/nextjs"; +import { currentUser } from "@clerk/nextjs/server"; import { redirect } from "next/navigation"; export default async function DashboardLayout({ children }: { children: React.ReactNode }) { diff --git a/frontend/components/Search.tsx b/frontend/components/Search.tsx index ed190fe..69835ca 100644 --- a/frontend/components/Search.tsx +++ b/frontend/components/Search.tsx @@ -45,7 +45,7 @@ export default function Search({ placeholder }: { placeholder: string }) { const params = new URLSearchParams(searchParams); //replace the last word with the clicked on suggestion - let splitSearch = params.get("q")!.match(/\w+:?/g)!; //match on any word (\w+) with an optional trailing colon (:?). ! to assert existence since we know they both exist, otherwise you couldn't click on the div + let splitSearch = params.get("q")!.match(/\w+:?/g)!; //match on any word (\w+) with an optional trailing colon (:?). ! to assert existence since we know they both exist, otherwise the div wouldn't exist const lastLen = splitSearch[splitSearch.length-1].length; const newVal = params.get("q")!.trim().slice(0, -lastLen) + (e.target as HTMLElement).innerText + " "; params.set("q", newVal); //TS can't detect the type of e.target properly, so we assert it inline diff --git a/server/prisma/schema.prisma b/server/prisma/schema.prisma index d13f8ae..feca9f8 100644 --- a/server/prisma/schema.prisma +++ b/server/prisma/schema.prisma @@ -4,9 +4,8 @@ generator py { } datasource db { - provider = "postgresql" - url = env("POSTGRES_PRISMA_URL") - directUrl = env("POSTGRES_URL_NON_POOLING") + provider = "postgresql" + url = env("POSTGRES_PRISMA_URL") } model Feature {