Skip to content

Commit

Permalink
temp landing
Browse files Browse the repository at this point in the history
  • Loading branch information
teachmetw committed Sep 10, 2023
1 parent 60c3758 commit fd3d371
Show file tree
Hide file tree
Showing 15 changed files with 980 additions and 445 deletions.
7 changes: 7 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Environment variables declared in this file are automatically made available to Prisma.
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema

# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings

DATABASE_URL="postgresql://johndoe:randompassword@localhost:5432/mydb?schema=public"
76 changes: 76 additions & 0 deletions components/input.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import React from 'react';

interface InputProps {
id: string;
onChange: any;
value: string;
label: string;
type?: string;
}



const Input: React.FC<InputProps> = ({
id,
onChange,
value,
label,
type
}) => {
return (
<div className="relative">
<input
value={value}
type={type}
onChange={onChange}
id={id}
className="
block
rounded-md
px-6
pt-6
pb-1
w-full
text-md
text-white
bg-neutral-700
appearance-none
focus:outline-none
focus:ring-0
peer
invalid:border-b-1
"
placeholder=" "

/>
<label
className="
absolute
text-md
text-zinc-400
duration-150
transform
-translate-y-3
scale-75
top-4
z-10
origin-[0]
left-6
peer-placeholder-shown:scale-100
peer-placeholder-shown:translate-y-0
peer-focus:scale-75
peer-focus:-translate-y-3
"
htmlFor={id}>
{label}

</label>


</div>

)

}

export default Input;
7 changes: 7 additions & 0 deletions global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { PrismaClient } from '@prisma/client';

declare global {
namespace globalThis {
var prismadb: PrismaClient;
}
}
6 changes: 6 additions & 0 deletions lib/prismadb.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { PrismaClient } from "@prisma/client";

const client = global.prismadb || new PrismaClient();
if (process.env.NODE_ENV === "production") global.prismadb = client;

export default client;
Loading

0 comments on commit fd3d371

Please sign in to comment.