-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ui] Minor bugfixes and improvements
- Loading branch information
1 parent
ae666e0
commit 3ec58f0
Showing
12 changed files
with
55 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
import { PrismaClient } from '@prisma/client'; | ||
|
||
const prisma = new PrismaClient(); | ||
const prismaClientSingleton = () => { | ||
return new PrismaClient(); | ||
}; | ||
|
||
type PrismaClientSingleton = ReturnType<typeof prismaClientSingleton>; | ||
|
||
const globalForPrisma = globalThis as unknown as { | ||
prisma: PrismaClientSingleton | undefined; | ||
}; | ||
|
||
const prisma = globalForPrisma.prisma ?? prismaClientSingleton(); | ||
|
||
export default prisma; | ||
|
||
if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { clsx, type ClassValue } from 'clsx'; | ||
import { twMerge } from 'tailwind-merge'; | ||
|
||
export function cn(...inputs: ClassValue[]) { | ||
return twMerge(clsx(inputs)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1909,6 +1909,11 @@ | |
"@radix-ui/react-label" "2.0.2" | ||
"@radix-ui/react-primitive" "1.0.3" | ||
|
||
"@radix-ui/react-icons@^1.3.0": | ||
version "1.3.0" | ||
resolved "https://registry.yarnpkg.com/@radix-ui/react-icons/-/react-icons-1.3.0.tgz#c61af8f323d87682c5ca76b856d60c2312dbcb69" | ||
integrity sha512-jQxj/0LKgp+j9BiTXz3O3sgs26RNet2iLWmsPyRz2SIcR4q/4SbazXfnYwbAr+vLYKSfc7qxzyGQA1HLlYiuNw== | ||
|
||
"@radix-ui/[email protected]": | ||
version "1.0.1" | ||
resolved "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.0.1.tgz" | ||
|
@@ -4823,6 +4828,11 @@ clone@^1.0.2: | |
resolved "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz" | ||
integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== | ||
|
||
clsx@^2.0.0: | ||
version "2.0.0" | ||
resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.0.0.tgz#12658f3fd98fafe62075595a5c30e43d18f3d00b" | ||
integrity sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q== | ||
|
||
color-convert@^1.9.0: | ||
version "1.9.3" | ||
resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" | ||
|
@@ -7766,6 +7776,11 @@ lru-cache@^6.0.0: | |
resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz" | ||
integrity sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g== | ||
|
||
lucide-react@^0.287.0: | ||
version "0.287.0" | ||
resolved "https://registry.yarnpkg.com/lucide-react/-/lucide-react-0.287.0.tgz#efa49872a91fa97b7ef650c4b40396b6880d0088" | ||
integrity sha512-auxP2bTGiMoELzX+6ItTeNzLmhGd/O+PHBsrXV2YwPXYCxarIFJhiMOSzFT9a1GWeYPSZtnWdLr79IVXr/5JqQ== | ||
|
||
lz-string@^1.5.0: | ||
version "1.5.0" | ||
resolved "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz" | ||
|
@@ -10046,6 +10061,11 @@ tailwind-merge@^1.9.1: | |
resolved "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-1.14.0.tgz" | ||
integrity sha512-3mFKyCo/MBcgyOTlrY8T7odzZFx+w+qKSMAmdFzRvqBfLlSigU6TZnlFHK0lkMwj9Bj8OYU+9yW9lmGuS0QEnQ== | ||
|
||
tailwindcss-animate@^1.0.7: | ||
version "1.0.7" | ||
resolved "https://registry.yarnpkg.com/tailwindcss-animate/-/tailwindcss-animate-1.0.7.tgz#318b692c4c42676cc9e67b19b78775742388bef4" | ||
integrity sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA== | ||
|
||
tailwindcss@^3.3.3: | ||
version "3.3.3" | ||
resolved "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.3.tgz" | ||
|