From 3239d73045621e986efaf18dc85dbd047efc588b Mon Sep 17 00:00:00 2001 From: ImAlpha Date: Fri, 20 Oct 2023 23:08:04 -0700 Subject: [PATCH] created prisma db connection --- Websites/jefes-nextjs/.env | 8 ++++++ .../app/components/NavBar/NavBar.tsx | 23 +++++++++++++----- Websites/jefes-nextjs/bun.lockb | Bin 135937 -> 137006 bytes Websites/jefes-nextjs/package.json | 2 ++ Websites/jefes-nextjs/prisma/schema.prisma | 12 +++++++++ 5 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 Websites/jefes-nextjs/.env create mode 100644 Websites/jefes-nextjs/prisma/schema.prisma diff --git a/Websites/jefes-nextjs/.env b/Websites/jefes-nextjs/.env new file mode 100644 index 0000000..89570a8 --- /dev/null +++ b/Websites/jefes-nextjs/.env @@ -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" \ No newline at end of file diff --git a/Websites/jefes-nextjs/app/components/NavBar/NavBar.tsx b/Websites/jefes-nextjs/app/components/NavBar/NavBar.tsx index 25f0241..94883de 100644 --- a/Websites/jefes-nextjs/app/components/NavBar/NavBar.tsx +++ b/Websites/jefes-nextjs/app/components/NavBar/NavBar.tsx @@ -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 (