prettify files

This commit is contained in:
MarconLP 2023-04-10 23:33:32 +02:00
parent 9260300521
commit 5b5a80e1b1
No known key found for this signature in database
GPG key ID: F4CAFFDFA3451D5E
5 changed files with 11 additions and 11 deletions

View file

@ -16,7 +16,7 @@ const server = z.object({
// Since NextAuth.js automatically uses the VERCEL_URL if present. // Since NextAuth.js automatically uses the VERCEL_URL if present.
(str) => process.env.VERCEL_URL ?? str, (str) => process.env.VERCEL_URL ?? str,
// VERCEL_URL doesn't include `https` so it cant be validated as a URL // VERCEL_URL doesn't include `https` so it cant be validated as a URL
process.env.VERCEL ? z.string().min(1) : z.string().url(), process.env.VERCEL ? z.string().min(1) : z.string().url()
), ),
// Add `.min(1) on ID and SECRET if you want to make sure they're not empty // Add `.min(1) on ID and SECRET if you want to make sure they're not empty
GOOGLE_CLIENT_ID: z.string(), GOOGLE_CLIENT_ID: z.string(),
@ -74,7 +74,7 @@ if (!!process.env.SKIP_ENV_VALIDATION == false) {
if (parsed.success === false) { if (parsed.success === false) {
console.error( console.error(
"❌ Invalid environment variables:", "❌ Invalid environment variables:",
parsed.error.flatten().fieldErrors, parsed.error.flatten().fieldErrors
); );
throw new Error("Invalid environment variables"); throw new Error("Invalid environment variables");
} }
@ -88,7 +88,7 @@ if (!!process.env.SKIP_ENV_VALIDATION == false) {
throw new Error( throw new Error(
process.env.NODE_ENV === "production" process.env.NODE_ENV === "production"
? "❌ Attempted to access a server-side environment variable on the client" ? "❌ Attempted to access a server-side environment variable on the client"
: `❌ Attempted to access server-side environment variable '${prop}' on the client`, : `❌ Attempted to access server-side environment variable '${prop}' on the client`
); );
return target[/** @type {keyof typeof target} */ (prop)]; return target[/** @type {keyof typeof target} */ (prop)];
}, },

View file

@ -12,7 +12,7 @@ export default createNextApiHandler({
env.NODE_ENV === "development" env.NODE_ENV === "development"
? ({ path, error }) => { ? ({ path, error }) => {
console.error( console.error(
`❌ tRPC failed on ${path ?? "<no-path>"}: ${error.message}`, `❌ tRPC failed on ${path ?? "<no-path>"}: ${error.message}`
); );
} }
: undefined, : undefined,

View file

@ -26,9 +26,7 @@ const Home: NextPage = () => {
href="/videos" href="/videos"
> >
<h3 className="text-2xl font-bold">Go to Videos </h3> <h3 className="text-2xl font-bold">Go to Videos </h3>
<div className="text-lg"> <div className="text-lg">The entire videos collection</div>
The entire videos collection
</div>
</Link> </Link>
</div> </div>
<div className="flex flex-col items-center gap-2"> <div className="flex flex-col items-center gap-2">
@ -50,7 +48,7 @@ const AuthShowcase: React.FC = () => {
const { data: secretMessage } = api.example.getSecretMessage.useQuery( const { data: secretMessage } = api.example.getSecretMessage.useQuery(
undefined, // no input undefined, // no input
{ enabled: sessionData?.user !== undefined }, { enabled: sessionData?.user !== undefined }
); );
return ( return (

View file

@ -16,7 +16,9 @@ const VideoList: NextPage = () => {
<main className="flex min-h-screen flex-col items-center justify-center bg-gradient-to-b from-[#2e026d] to-[#15162c]"> <main className="flex min-h-screen flex-col items-center justify-center bg-gradient-to-b from-[#2e026d] to-[#15162c]">
<div className="container flex flex-col items-center justify-center gap-12 px-4 py-16 "> <div className="container flex flex-col items-center justify-center gap-12 px-4 py-16 ">
<h1 className="text-5xl font-extrabold tracking-tight text-white sm:text-[5rem]"> <h1 className="text-5xl font-extrabold tracking-tight text-white sm:text-[5rem]">
<span className="text-[hsl(280,100%,70%)]">video collection list</span> <span className="text-[hsl(280,100%,70%)]">
video collection list
</span>
</h1> </h1>
</div> </div>
</main> </main>