-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
7,102 additions
and
2,153 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ yarn-error.log* | |
|
||
# local env files | ||
.env*.local | ||
.env | ||
|
||
# vercel | ||
.vercel | ||
|
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 was deleted.
Oops, something went wrong.
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,65 @@ | ||
import React, { useState, useEffect } from "react"; | ||
import Skeleton, { SkeletonTheme } from 'react-loading-skeleton' | ||
import 'react-loading-skeleton/dist/skeleton.css' | ||
import { useTheme } from 'next-themes' | ||
|
||
interface SkeletonProps { | ||
visible: boolean; | ||
} | ||
|
||
const SkeletonCard = ({ visible }: SkeletonProps): JSX.Element => { | ||
return ( | ||
<Theme> | ||
<ul className="flex flex-col gap-8 sm:gap-10"> | ||
{[...Array(2)].map((x) => ( | ||
<li key={x} className={`${visible ? "flex" : "hidden"} flex-col-reverse sm:flex-row justify-between gap-4 `}> | ||
<div className="w-full flex-1 max-w-[450px] sm:flex sm:flex-col sm:justify-between sm:items-start "> | ||
<div className="w-[350px]"> | ||
<Skeleton height={50} width={200} /> | ||
<div className="space-y-2" > | ||
<Skeleton height={20} width={350} count={3} /> | ||
</div> | ||
<Skeleton height={40} width={250} /> | ||
</div> | ||
<div id="tags" className="flex items-center flex-wrap gap-2"> | ||
<Skeleton height={35} width={100} /> | ||
<Skeleton height={35} width={115} /> | ||
<Skeleton height={35} width={90} /> | ||
</div> | ||
</div> | ||
<div className="w-full flex-1 sm:max-w-[350px] mb-4 sm:mb-0 rounded overflow-hidden relative group"> | ||
<Skeleton className="w-full h-52 sm:w-[350px] sm:h-[350px] rounded-lg bg-white " /> | ||
</div> | ||
</li> | ||
))} | ||
</ul> | ||
</Theme> | ||
); | ||
}; | ||
|
||
const Theme = ({ children }) => { | ||
const [mounted, setMounted] = useState(false) | ||
const { theme } = useTheme() | ||
useEffect(() => setMounted(true), []) | ||
|
||
if (!mounted) return null | ||
|
||
return ( | ||
<div> | ||
{theme === "dark" ? | ||
<div> | ||
<SkeletonTheme baseColor='#202020' highlightColor="#444" > | ||
{children} | ||
</SkeletonTheme> | ||
</div> | ||
: | ||
<div> | ||
{children} | ||
</div> | ||
} | ||
</div> | ||
); | ||
}; | ||
|
||
export default SkeletonCard; | ||
|
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,17 @@ | ||
import { PrismaClient } from '@prisma/client'; | ||
|
||
let prisma: PrismaClient; | ||
|
||
declare global { | ||
var prisma: PrismaClient | undefined; | ||
} | ||
|
||
if (process.env.NODE_ENV === 'production') { | ||
prisma = new PrismaClient(); | ||
} else { | ||
if (!global.prisma) { | ||
global.prisma = new PrismaClient(); | ||
} | ||
prisma = global.prisma; | ||
} | ||
export default 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
Oops, something went wrong.
c7d4e6c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
personal-website – ./
personal-website-git-main-gillyhuga.vercel.app
gillyhuga.vercel.app
www.gillyhuga.com
gillyhuga.com
personal-website-gillyhuga.vercel.app