created prisma db connection

This commit is contained in:
Jacob Delgado 2023-10-20 23:08:04 -07:00
parent 14f6efc2c5
commit 3239d73045
5 changed files with 39 additions and 6 deletions

View File

@ -0,0 +1,8 @@
# 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"
DATABASE_URL="mysql://'alpha':'!Plop2099'@192.168.50.190:3306/db"

View File

@ -1,27 +1,38 @@
'use client';
import React from "react";
import Link from "next/link";
import Image from "next/image";
import Jefes from "../../../public/jefes_logo.jpg";
import { usePathname } from "next/navigation";
import classnames from 'classnames';
const NavBar = () => {
const currentPath = usePathname();
console.log(currentPath);
// Create an array to hold the list items
const links = [
{ label: "Dashboard", href: "/" },
{ label: "Issues", href: "/" },
{ label: "Dashboard", href: "/Dashboard" },
{ label: "Issues", href: "/Issues" },
];
return (
<nav className="flex gap-4 border-b mb-5 px-5 h-14 items-center">
<Link href="/">
<Image src={Jefes} width={50} height="auto" alt="Logo" />
<Image src={Jefes} width={50} height={50} alt="Logo" />
</Link>
<ul className="flex gap-4 hover:cursor-pointer">
{links.map((link) => (
<Link
key={link.href}
className="text-zinc-500 hover:text-zinc-800"
href={link.href}
>
// className={`${link.href === currentPath ? 'text-zinc-900' : 'text-zinc-500 hover:text-zinc-800'}`}
// replace with classnames object instead
className={classnames({
'text-zinc-900': link.href === currentPath,
'text-zinc-500' : link.href !== currentPath,
'hover:text-zinc-800': true,
})}
href={link.href}>
{link.label}
</Link>
))}

Binary file not shown.

View File

@ -9,7 +9,9 @@
"lint": "next lint"
},
"dependencies": {
"classnames": "^2.3.2",
"next": "13.5.6",
"prisma": "^5.4.2",
"react": "^18",
"react-dom": "^18",
"react-icons": "^4.11.0"

View File

@ -0,0 +1,12 @@
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
// provider = "postgresql"
provider = "mysql"
url = env("DATABASE_URL")
}