diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 3c3629e6..00000000 --- a/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/.eslintrc.json b/.eslintrc.json index d26019a2..cbe13564 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -8,7 +8,7 @@ "ecmaVersion": "latest", "sourceType": "module" }, - "plugins": ["@typescript-eslint", "import"], + "plugins": ["@typescript-eslint", "import", "no-relative-import-paths"], "extends": [ "plugin:import/recommended", "plugin:import/typescript", @@ -33,12 +33,20 @@ ], "react/function-component-definition": [ 2, - { "namedComponents": "function-declaration" } + { + "namedComponents": "function-declaration" + } ], "react/destructuring-assignment": [2, "always"], "react/button-has-type": 2, "react/no-array-index-key": 2, "import/order": 2, + "no-relative-import-paths/no-relative-import-paths": [ + "error", + { + "allowSameFolder": true + } + ], "semi": [2, "always"], "quotes": [2, "double"], "prefer-destructuring": [ @@ -61,12 +69,23 @@ "arrow-body-style": [2, "as-needed"], "arrow-parens": [2, "always"], "space-infix-ops": 2, - "arrow-spacing": [2, { "before": true, "after": true }], - "no-unused-vars": [2, { "args": "all", "argsIgnorePattern": "_" }], + "arrow-spacing": [ + 2, + { + "before": true, + "after": true + } + ], + "no-unused-vars": [ + 2, + { + "args": "all", + "argsIgnorePattern": "_" + } + ], "guard-for-in": 2, "no-await-in-loop": 2, "indent": [2, 2], - "object-curly-newline": [2, { "minProperties": 4, "consistent": true }], "brace-style": 2, "no-multiple-empty-lines": 2, "eol-last": [2, "always"], diff --git a/Dockerfile.dev b/Dockerfile.dev deleted file mode 100644 index 04fbf3d1..00000000 --- a/Dockerfile.dev +++ /dev/null @@ -1,15 +0,0 @@ -FROM node:16-alpine - -WORKDIR /usr/src/app - -COPY ./package*.json ./ - -COPY prisma ./prisma/ - -COPY .env ./ - -RUN yarn install - -COPY ./ ./ - -CMD ["yarn", "dev"] \ No newline at end of file diff --git a/README.md b/README.md index bdca1c59..851d5439 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ First we need to have yarn installed on your computer, to do so, run the followi ```bash npm install --global yarn ``` - To install all the project dependencies, inside the project's root folder, run the following in the command line ```bash @@ -13,86 +12,10 @@ yarn Create a `.env` file at the root of your project using the `.env.example` file to know which keys to add - -Add these env variables specifically (it's important to have exactly the same because of how docker is configured): -``` -DATABASE_URL=postgresql://chingu:chingu@chingu:5433/dashboard?schema=public -HOSTNAME=chingu -POSTGRES_USER=chingu -POSTGRES_PASSWORD=chingu -POSTGRES_DB=dashboard -PGADMIN_EMAIL=chinguadmin@chingu.com -PGADMIN_PW=chingu5432 -``` - -Run these commands when starting up your project: - -``` -docker compose build -docker compose up -``` - -Open a 2nd terminal window and run these commands: - -``` -docker ps -docker exec -it sh -npx prisma migrate dev -``` - -Docker ps should list 3 containers (assuming you're not running anything else). If you have more, you can just look for 3 that were created recently. The -id you want should be under a image name of something like chingu-dashboard_app (it should be whatyounamedyourprojectfolder-app). The other 2 image names will have pgadmin and postgres in it (look for the one without -those in its name). - -If you have docker desktop, you can just use the cli in the app container using the gui (way easier). - -To open pgadmin, go to localhost:4000. Put in the credentials, as written in the .env file. Again, if you have docker desktop, you can just open from the gui. - -To run prisma studio, follow the same steps above to invoke a command inside your docker container. - -``` -docker ps (to find the id of your container) -docker exec -it sh -npx prisma studio -``` - -**It is important to run your migration before running prisma studio or it will error** - -You can access prisma studio at localhost:5555 - -When done with your session, run the following command: - -``` -docker compose down -``` - -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). - -## Getting Started - -First, run the development server: +To run the development server: ```bash yarn dev ``` -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +Open [http://localhost:3000](http://localhost:3000) diff --git a/cypress/fixtures/profile.json b/cypress/fixtures/profile.json new file mode 100644 index 00000000..a95e88f9 --- /dev/null +++ b/cypress/fixtures/profile.json @@ -0,0 +1,5 @@ +{ + "id": 8739, + "name": "Jane", + "email": "jane@example.com" +} diff --git a/cypress/fixtures/users.json b/cypress/fixtures/users.json new file mode 100644 index 00000000..82a0056b --- /dev/null +++ b/cypress/fixtures/users.json @@ -0,0 +1,232 @@ +[ + { + "id": 1, + "name": "Leanne Graham", + "username": "Bret", + "email": "Sincere@april.biz", + "address": { + "street": "Kulas Light", + "suite": "Apt. 556", + "city": "Gwenborough", + "zipcode": "92998-3874", + "geo": { + "lat": "-37.3159", + "lng": "81.1496" + } + }, + "phone": "1-770-736-8031 x56442", + "website": "hildegard.org", + "company": { + "name": "Romaguera-Crona", + "catchPhrase": "Multi-layered client-server neural-net", + "bs": "harness real-time e-markets" + } + }, + { + "id": 2, + "name": "Ervin Howell", + "username": "Antonette", + "email": "Shanna@melissa.tv", + "address": { + "street": "Victor Plains", + "suite": "Suite 879", + "city": "Wisokyburgh", + "zipcode": "90566-7771", + "geo": { + "lat": "-43.9509", + "lng": "-34.4618" + } + }, + "phone": "010-692-6593 x09125", + "website": "anastasia.net", + "company": { + "name": "Deckow-Crist", + "catchPhrase": "Proactive didactic contingency", + "bs": "synergize scalable supply-chains" + } + }, + { + "id": 3, + "name": "Clementine Bauch", + "username": "Samantha", + "email": "Nathan@yesenia.net", + "address": { + "street": "Douglas Extension", + "suite": "Suite 847", + "city": "McKenziehaven", + "zipcode": "59590-4157", + "geo": { + "lat": "-68.6102", + "lng": "-47.0653" + } + }, + "phone": "1-463-123-4447", + "website": "ramiro.info", + "company": { + "name": "Romaguera-Jacobson", + "catchPhrase": "Face to face bifurcated interface", + "bs": "e-enable strategic applications" + } + }, + { + "id": 4, + "name": "Patricia Lebsack", + "username": "Karianne", + "email": "Julianne.OConner@kory.org", + "address": { + "street": "Hoeger Mall", + "suite": "Apt. 692", + "city": "South Elvis", + "zipcode": "53919-4257", + "geo": { + "lat": "29.4572", + "lng": "-164.2990" + } + }, + "phone": "493-170-9623 x156", + "website": "kale.biz", + "company": { + "name": "Robel-Corkery", + "catchPhrase": "Multi-tiered zero tolerance productivity", + "bs": "transition cutting-edge web services" + } + }, + { + "id": 5, + "name": "Chelsey Dietrich", + "username": "Kamren", + "email": "Lucio_Hettinger@annie.ca", + "address": { + "street": "Skiles Walks", + "suite": "Suite 351", + "city": "Roscoeview", + "zipcode": "33263", + "geo": { + "lat": "-31.8129", + "lng": "62.5342" + } + }, + "phone": "(254)954-1289", + "website": "demarco.info", + "company": { + "name": "Keebler LLC", + "catchPhrase": "User-centric fault-tolerant solution", + "bs": "revolutionize end-to-end systems" + } + }, + { + "id": 6, + "name": "Mrs. Dennis Schulist", + "username": "Leopoldo_Corkery", + "email": "Karley_Dach@jasper.info", + "address": { + "street": "Norberto Crossing", + "suite": "Apt. 950", + "city": "South Christy", + "zipcode": "23505-1337", + "geo": { + "lat": "-71.4197", + "lng": "71.7478" + } + }, + "phone": "1-477-935-8478 x6430", + "website": "ola.org", + "company": { + "name": "Considine-Lockman", + "catchPhrase": "Synchronised bottom-line interface", + "bs": "e-enable innovative applications" + } + }, + { + "id": 7, + "name": "Kurtis Weissnat", + "username": "Elwyn.Skiles", + "email": "Telly.Hoeger@billy.biz", + "address": { + "street": "Rex Trail", + "suite": "Suite 280", + "city": "Howemouth", + "zipcode": "58804-1099", + "geo": { + "lat": "24.8918", + "lng": "21.8984" + } + }, + "phone": "210.067.6132", + "website": "elvis.io", + "company": { + "name": "Johns Group", + "catchPhrase": "Configurable multimedia task-force", + "bs": "generate enterprise e-tailers" + } + }, + { + "id": 8, + "name": "Nicholas Runolfsdottir V", + "username": "Maxime_Nienow", + "email": "Sherwood@rosamond.me", + "address": { + "street": "Ellsworth Summit", + "suite": "Suite 729", + "city": "Aliyaview", + "zipcode": "45169", + "geo": { + "lat": "-14.3990", + "lng": "-120.7677" + } + }, + "phone": "586.493.6943 x140", + "website": "jacynthe.com", + "company": { + "name": "Abernathy Group", + "catchPhrase": "Implemented secondary concept", + "bs": "e-enable extensible e-tailers" + } + }, + { + "id": 9, + "name": "Glenna Reichert", + "username": "Delphine", + "email": "Chaim_McDermott@dana.io", + "address": { + "street": "Dayna Park", + "suite": "Suite 449", + "city": "Bartholomebury", + "zipcode": "76495-3109", + "geo": { + "lat": "24.6463", + "lng": "-168.8889" + } + }, + "phone": "(775)976-6794 x41206", + "website": "conrad.com", + "company": { + "name": "Yost and Sons", + "catchPhrase": "Switchable contextually-based project", + "bs": "aggregate real-time technologies" + } + }, + { + "id": 10, + "name": "Clementina DuBuque", + "username": "Moriah.Stanton", + "email": "Rey.Padberg@karina.biz", + "address": { + "street": "Kattie Turnpike", + "suite": "Suite 198", + "city": "Lebsackbury", + "zipcode": "31428-2261", + "geo": { + "lat": "-38.2386", + "lng": "57.2232" + } + }, + "phone": "024-648-3804", + "website": "ambrose.net", + "company": { + "name": "Hoeger LLC", + "catchPhrase": "Centralized empowering task-force", + "bs": "target end-to-end models" + } + } +] diff --git a/cypress/screenshots/2-advanced-examples/misc.cy.js/my-image.png b/cypress/screenshots/2-advanced-examples/misc.cy.js/my-image.png new file mode 100644 index 00000000..2fcaf653 Binary files /dev/null and b/cypress/screenshots/2-advanced-examples/misc.cy.js/my-image.png differ diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 4560cd1c..00000000 --- a/docker-compose.yml +++ /dev/null @@ -1,44 +0,0 @@ -version: "3.7" -services: - app: - stdin_open: true - container_name: app - build: - dockerfile: Dockerfile.dev - context: . - ports: - - 3000:3000 - - 5555:5555 - depends_on: - - db - environment: - - WATCHPACK_POLLING=true - volumes: - - .:/usr/src/app - - /usr/src/app/node_modules - db: - container_name: db - image: postgres:latest - hostname: $HOSTNAME - environment: - POSTGRES_USER: $POSTGRES_USER - POSTGRES_PASSWORD: $POSTGRES_PASSWORD - POSTGRES_DB: $POSTGRES_DB - PGPORT: 5433 - volumes: - - postgres-data:/var/lib/postgresql/data - pgadmin: - image: dpage/pgadmin4 - container_name: pgadmin - depends_on: - - db - ports: - - "4000:80" - environment: - PGADMIN_DEFAULT_EMAIL: $PGADMIN_EMAIL - PGADMIN_DEFAULT_PASSWORD: $PGADMIN_PW - volumes: - - pgadmin-data:/var/lib/pgadmin -volumes: - postgres-data: - pgadmin-data: diff --git a/package.json b/package.json index e0b3948d..f9b741d1 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,8 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "prisma generate && next dev", - "build": "prisma generate && next build", + "dev": "next dev", + "build": "next build", "start": "next start", "lint": "next lint", "prettier": "prettier . --write", @@ -14,11 +14,8 @@ }, "dependencies": { "@heroicons/react": "^2.0.18", - "@prisma/client": "5.1.1", "@reduxjs/toolkit": "^1.9.5", "next": "13.4.12", - "next-auth": "^4.22.3", - "prisma": "^5.1.1", "react": "18.2.0", "react-dom": "18.2.0", "react-redux": "^8.1.2", @@ -41,6 +38,7 @@ "eslint-config-prettier": "^8.10.0", "eslint-import-resolver-typescript": "^3.5.5", "eslint-plugin-import": "^2.28.0", + "eslint-plugin-no-relative-import-paths": "^1.5.2", "husky": "^8.0.0", "jest": "^29.6.2", "jest-environment-jsdom": "^29.6.2", diff --git a/prisma/migrations/20230807161830_initial_setup/migration.sql b/prisma/migrations/20230807161830_initial_setup/migration.sql deleted file mode 100644 index 0d627675..00000000 --- a/prisma/migrations/20230807161830_initial_setup/migration.sql +++ /dev/null @@ -1,7 +0,0 @@ --- CreateTable -CREATE TABLE "User" ( - "uuid" UUID NOT NULL, - "username" VARCHAR(255) NOT NULL, - - CONSTRAINT "User_pkey" PRIMARY KEY ("uuid") -); diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml deleted file mode 100644 index fbffa92c..00000000 --- a/prisma/migrations/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) -provider = "postgresql" \ No newline at end of file diff --git a/prisma/schema.prisma b/prisma/schema.prisma deleted file mode 100644 index 719428f3..00000000 --- a/prisma/schema.prisma +++ /dev/null @@ -1,16 +0,0 @@ -// 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" - url = env("DATABASE_URL") -} - -model User { - uuid String @id @default(uuid()) @db.Uuid - username String @db.VarChar(255) -} diff --git a/public/grey_ball.png b/public/grey_ball.png deleted file mode 100644 index 5f3cd173..00000000 Binary files a/public/grey_ball.png and /dev/null differ diff --git a/public/avatar.png b/public/img/avatar.png similarity index 100% rename from public/avatar.png rename to public/img/avatar.png diff --git a/public/chingu_logo.png b/public/img/chingu_logo.png similarity index 100% rename from public/chingu_logo.png rename to public/img/chingu_logo.png diff --git a/public/img/ideation_banner.png b/public/img/ideation_banner.png new file mode 100644 index 00000000..2a4e5889 Binary files /dev/null and b/public/img/ideation_banner.png differ diff --git a/pull_request_template.md b/pull_request_template.md new file mode 100644 index 00000000..aa7da788 --- /dev/null +++ b/pull_request_template.md @@ -0,0 +1,30 @@ +# Description + +Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change. + +## Issue link + +Fixes # (issue) + +## Type of change + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] This change requires a documentation update + +# How Has This Been Tested? + +Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration + + +# Checklist: + +- [ ] My code follows the style guidelines of this project +- [ ] I have performed a self-review of my code +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have made corresponding changes to the documentation +- [ ] My changes generate no new warnings +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes +- [ ] Any dependent changes have been merged and published in downstream modules \ No newline at end of file diff --git a/src/app/api/auth/[...nextauth]/options.ts b/src/app/api/auth/[...nextauth]/options.ts deleted file mode 100644 index 0f139217..00000000 --- a/src/app/api/auth/[...nextauth]/options.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { NextAuthOptions } from "next-auth"; -import GitHubProvider from "next-auth/providers/github"; -import DiscordProvider from "next-auth/providers/discord"; - -export const options: NextAuthOptions = { - providers: [ - GitHubProvider({ - clientId: process.env.GITHUB_ID as string, - clientSecret: process.env.GITHUB_SECRET as string, - }), - DiscordProvider({ - clientId: process.env.DISCORD_ID as string, - clientSecret: process.env.DISCORD_SECRET as string, - }), - ], -}; diff --git a/src/app/api/auth/[...nextauth]/route.ts b/src/app/api/auth/[...nextauth]/route.ts deleted file mode 100644 index 9ef211f1..00000000 --- a/src/app/api/auth/[...nextauth]/route.ts +++ /dev/null @@ -1,7 +0,0 @@ -import NextAuth from "next-auth/next"; -import { options } from "./options"; - -// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -const handler = NextAuth(options); - -export { handler as GET, handler as POST }; diff --git a/src/app/api/test/route.ts b/src/app/api/test/route.ts deleted file mode 100644 index a23d1a77..00000000 --- a/src/app/api/test/route.ts +++ /dev/null @@ -1,7 +0,0 @@ -// for testing purposes - -import { NextResponse } from "next/server"; - -export function GET() { - return NextResponse.json("hi there"); -} diff --git a/src/app/counter/page.tsx b/src/app/counter/page.tsx index fbb2741c..6b31123a 100644 --- a/src/app/counter/page.tsx +++ b/src/app/counter/page.tsx @@ -40,7 +40,7 @@ function CounterPage() { - - {counter.value} +
{counter.value}
); } diff --git a/src/app/directory/components/TeamRow.tsx b/src/app/directory/components/TeamRow.tsx index 77c146af..f91af004 100644 --- a/src/app/directory/components/TeamRow.tsx +++ b/src/app/directory/components/TeamRow.tsx @@ -1,5 +1,5 @@ import { PencilSquareIcon } from "@heroicons/react/24/solid"; -import { TeamMember } from "./fixtures/MyTeam"; +import { TeamMember } from "."; import { Button } from "@/components"; interface TeamRowProps { diff --git a/src/app/directory/components/TeamTable.tsx b/src/app/directory/components/TeamTable.tsx index 636991f3..e6a71f7e 100644 --- a/src/app/directory/components/TeamTable.tsx +++ b/src/app/directory/components/TeamTable.tsx @@ -1,6 +1,5 @@ import styles from "./TeamRow.module.css"; -import { teamMembers } from "./fixtures/MyTeam"; -import { TeamRow } from "."; +import { TeamRow, teamMembers } from "."; // Temp: const currentUserId = "1"; diff --git a/src/app/directory/components/index.ts b/src/app/directory/components/index.ts index 2e1afbb7..0ecd173c 100644 --- a/src/app/directory/components/index.ts +++ b/src/app/directory/components/index.ts @@ -1,2 +1,3 @@ export { default as TeamTable } from "./TeamTable"; export { default as TeamRow } from "./TeamRow"; +export * from "./fixtures/MyTeam"; diff --git a/src/app/directory/index.ts b/src/app/directory/index.ts index 2b241792..535269a9 100644 --- a/src/app/directory/index.ts +++ b/src/app/directory/index.ts @@ -1 +1,2 @@ export { default as DirectoryPage } from "./page"; +export * from "./components"; diff --git a/src/app/directory/page.tsx b/src/app/directory/page.tsx index 7cc644d0..6b69d371 100644 --- a/src/app/directory/page.tsx +++ b/src/app/directory/page.tsx @@ -1,4 +1,4 @@ -import { TeamTable } from "./components"; +import { TeamTable } from "."; function DirectoryPage() { return ; diff --git a/src/app/ideation/components/fixtures/index.ts b/src/app/ideation/components/fixtures/index.ts new file mode 100644 index 00000000..fe18c0e5 --- /dev/null +++ b/src/app/ideation/components/fixtures/index.ts @@ -0,0 +1 @@ +export { ideation, type Ideation } from "./ideation"; diff --git a/src/app/ideation/components/index.ts b/src/app/ideation/components/index.ts index a5c98d9f..b6758a1c 100644 --- a/src/app/ideation/components/index.ts +++ b/src/app/ideation/components/index.ts @@ -3,4 +3,4 @@ export { default as IdeationContainer } from "./IdeationContainer"; export { default as VoteDescriptionCard } from "./VoteDescriptionCard"; export { default as VoteCard } from "./VoteCard"; export { default as ContributionCard } from "./ContributionCard"; -export { ideation, type Ideation } from "./fixtures/ideation"; +export * from "./fixtures"; diff --git a/src/app/ideation/index.ts b/src/app/ideation/index.ts index e69de29b..3a6a1246 100644 --- a/src/app/ideation/index.ts +++ b/src/app/ideation/index.ts @@ -0,0 +1,2 @@ +export * from "./components"; +export { default as IdeationPage } from "./page"; diff --git a/src/app/ideation/page.tsx b/src/app/ideation/page.tsx index ad98a635..4dc3fe39 100644 --- a/src/app/ideation/page.tsx +++ b/src/app/ideation/page.tsx @@ -1,13 +1,16 @@ -import { - CreateIdeationContainer, - IdeationContainer, - ideation, -} from "./components"; +import { CreateIdeationContainer, IdeationContainer, ideation } from "."; +import { Banner } from "@/components"; function IdeationPage() { return (
+ {ideation.map((i) => ( ; diff --git a/src/components/Banner.tsx b/src/components/Banner.tsx new file mode 100644 index 00000000..3d03615d --- /dev/null +++ b/src/components/Banner.tsx @@ -0,0 +1,22 @@ +import Image from "next/image"; + +interface BannerProps { + image: string; + alt: string; + title: string; + description: string; +} + +function Banner({ image, alt, title, description }: BannerProps) { + return ( +
+ {alt} +
+

{title}

+

{description}

+
+
+ ); +} + +export default Banner; diff --git a/src/components/index.ts b/src/components/index.ts index 8e3e9399..7c17c28d 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -1,4 +1,5 @@ export { default as StoreProvider } from "./StoreProvider"; export { default as Avatar } from "./Avatar"; -export { default as Navbar } from "./navbar/Navbar"; export { default as Button } from "./Button"; +export { default as Banner } from "./Banner"; +export * from "./navbar"; diff --git a/src/components/navbar/ChinguMenu.tsx b/src/components/navbar/ChinguMenu.tsx index 5236d972..16d96771 100644 --- a/src/components/navbar/ChinguMenu.tsx +++ b/src/components/navbar/ChinguMenu.tsx @@ -4,7 +4,7 @@ export default function ChinguMenu() { return (
Chingu Logo
- +
diff --git a/src/components/navbar/index.ts b/src/components/navbar/index.ts index 98bf69aa..1aa8850e 100644 --- a/src/components/navbar/index.ts +++ b/src/components/navbar/index.ts @@ -2,3 +2,4 @@ export { default as Bell } from "./Bell"; export { default as ChinguMenu } from "./ChinguMenu"; export { default as DropDown } from "./DropDown"; export { default as DropDownLink } from "./DropDownLink"; +export { default as Navbar } from "./Navbar"; diff --git a/src/db/prisma.ts b/src/db/prisma.ts deleted file mode 100644 index 4383aaaa..00000000 --- a/src/db/prisma.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { PrismaClient } from "@prisma/client"; - -declare global { - // eslint-disable-next-line @typescript-eslint/no-namespace - namespace NodeJS { - interface Global {} - } -} - -interface CustomeNodeJsGlobal extends NodeJS.Global { - prisma: PrismaClient; -} - -declare const global: CustomeNodeJsGlobal; - -const prisma = global.prisma || new PrismaClient(); - -if (process.env.NODE_ENV === "development") global.prisma = prisma; - -export default prisma; diff --git a/src/store/features/index.ts b/src/store/features/index.ts new file mode 100644 index 00000000..bd1575cb --- /dev/null +++ b/src/store/features/index.ts @@ -0,0 +1 @@ +export * from "./counter"; diff --git a/src/store/index.ts b/src/store/index.ts index b66772d0..a9e4301c 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -1,3 +1,3 @@ export { store, type RootState, type AppDispatch } from "./store"; export { useAppDispatch, useAppSelector } from "./hooks"; -export { increment, decrement, selectCount } from "./features/counter"; +export * from "./features"; diff --git a/yarn.lock b/yarn.lock index 2da95ee2..6c3943d8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -272,7 +272,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.20.13", "@babel/runtime@^7.20.7", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.20.7", "@babel/runtime@^7.9.2": version "7.22.6" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.6.tgz#57d64b9ae3cff1d67eb067ae117dac087f5bd438" integrity sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ== @@ -734,11 +734,6 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@panva/hkdf@^1.0.2": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@panva/hkdf/-/hkdf-1.1.1.tgz#ab9cd8755d1976e72fc77a00f7655a64efe6cd5d" - integrity sha512-dhPeilub1NuIG0X5Kvhh9lH4iW3ZsHlnzwgwbOlgwQ2wG1IqFzsgHqmKPk3WzsdWAeaxKJxgM0+W433RmN45GA== - "@pkgr/utils@^2.3.1": version "2.4.2" resolved "https://registry.yarnpkg.com/@pkgr/utils/-/utils-2.4.2.tgz#9e638bbe9a6a6f165580dc943f138fd3309a2cbc" @@ -751,23 +746,6 @@ picocolors "^1.0.0" tslib "^2.6.0" -"@prisma/client@5.1.1": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.1.1.tgz#ea2b0c8599bdb3f86d92e8df46fba795a744db01" - integrity sha512-fxcCeK5pMQGcgCqCrWsi+I2rpIbk0rAhdrN+ke7f34tIrgPwA68ensrpin+9+fZvuV2OtzHmuipwduSY6HswdA== - dependencies: - "@prisma/engines-version" "5.1.1-1.6a3747c37ff169c90047725a05a6ef02e32ac97e" - -"@prisma/engines-version@5.1.1-1.6a3747c37ff169c90047725a05a6ef02e32ac97e": - version "5.1.1-1.6a3747c37ff169c90047725a05a6ef02e32ac97e" - resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-5.1.1-1.6a3747c37ff169c90047725a05a6ef02e32ac97e.tgz#2e8a1f098ec09452dbe00923b24f582f95d1747c" - integrity sha512-owZqbY/wucbr65bXJ/ljrHPgQU5xXTSkmcE/JcbqE1kusuAXV/TLN3/exmz21SZ5rJ7WDkyk70J2G/n68iogbQ== - -"@prisma/engines@5.1.1": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.1.1.tgz#9c26d209f93a563e048eab63b1976f222f1707d0" - integrity sha512-NV/4nVNWFZSJCCIA3HIFJbbDKO/NARc9ej0tX5S9k2EVbkrFJC4Xt9b0u4rNZWL4V+F5LAjvta8vzEUw0rw+HA== - "@reduxjs/toolkit@^1.9.5": version "1.9.5" resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-1.9.5.tgz#d3987849c24189ca483baa7aa59386c8e52077c4" @@ -1865,11 +1843,6 @@ convert-source-map@^2.0.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== -cookie@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" - integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== - core-util-is@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -2436,6 +2409,11 @@ eslint-plugin-jsx-a11y@^6.5.1: object.fromentries "^2.0.6" semver "^6.3.0" +eslint-plugin-no-relative-import-paths@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-no-relative-import-paths/-/eslint-plugin-no-relative-import-paths-1.5.2.tgz#c35f2fd0bf2a6a57b268193ed7df63ff7000134e" + integrity sha512-wMlL+TVuDhKk1plP+w3L4Hc7+u89vUkrOYq6/0ARjcYqwc9/YaS9uEXNzaqAk+WLoEgakzNL5JgJJw6m4qd5zw== + eslint-plugin-react-hooks@5.0.0-canary-7118f5dd7-20230705: version "5.0.0-canary-7118f5dd7-20230705" resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.0.0-canary-7118f5dd7-20230705.tgz#4d55c50e186f1a2b0636433d2b0b2f592ddbccfd" @@ -3884,11 +3862,6 @@ jiti@^1.18.2: resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.19.1.tgz#fa99e4b76a23053e0e7cde098efe1704a14c16f1" integrity sha512-oVhqoRDaBXf7sjkll95LHVS6Myyyb1zaunVwk4Z0+WPSW4gjS0pl01zYKHScTuyEhQsFxV5L4DR5r+YqSyqyyg== -jose@^4.11.4, jose@^4.14.4: - version "4.14.4" - resolved "https://registry.yarnpkg.com/jose/-/jose-4.14.4.tgz#59e09204e2670c3164ee24cbfe7115c6f8bff9ca" - integrity sha512-j8GhLiKmUAh+dsFXlX1aJCbt5KMibuKb+d7j1JaOJG6s2UjX1PQlW+OKB/sD4a/5ZYF4RcmYmLSndOoU3Lt/3g== - "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -4254,21 +4227,6 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -next-auth@^4.22.3: - version "4.22.3" - resolved "https://registry.yarnpkg.com/next-auth/-/next-auth-4.22.3.tgz#bbe5152e0e3ea6d625731f23adba4fd2e3d2d570" - integrity sha512-XAgy9xV3J2eJOXrQhmxdjV6MLM29ibm6WtMXc3KY6IPZeApf+SuBuPvlqCUfbu5YsAzlg9WSw6u01dChTfeZOA== - dependencies: - "@babel/runtime" "^7.20.13" - "@panva/hkdf" "^1.0.2" - cookie "^0.5.0" - jose "^4.11.4" - oauth "^0.9.15" - openid-client "^5.4.0" - preact "^10.6.3" - preact-render-to-string "^5.1.19" - uuid "^8.3.2" - next@13.4.12: version "13.4.12" resolved "https://registry.yarnpkg.com/next/-/next-13.4.12.tgz#809b21ea0aabbe88ced53252c88c4a5bd5af95df" @@ -4332,21 +4290,11 @@ nwsapi@^2.2.2: resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.7.tgz#738e0707d3128cb750dddcfe90e4610482df0f30" integrity sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ== -oauth@^0.9.15: - version "0.9.15" - resolved "https://registry.yarnpkg.com/oauth/-/oauth-0.9.15.tgz#bd1fefaf686c96b75475aed5196412ff60cfb9c1" - integrity sha512-a5ERWK1kh38ExDEfoO6qUHJb32rd7aYmPHuyCu3Fta/cnICvYmgd2uhuKXvPD+PXB+gCEYYEaQdIRAjCOwAKNA== - object-assign@^4.0.1, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== -object-hash@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.2.0.tgz#5ad518581eefc443bd763472b8ff2e9c2c0d54a5" - integrity sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw== - object-hash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" @@ -4425,11 +4373,6 @@ object.values@^1.1.6: define-properties "^1.1.4" es-abstract "^1.20.4" -oidc-token-hash@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/oidc-token-hash/-/oidc-token-hash-5.0.3.tgz#9a229f0a1ce9d4fc89bcaee5478c97a889e7b7b6" - integrity sha512-IF4PcGgzAr6XXSff26Sk/+P4KZFJVuHAJZj3wgO3vX2bMdNVp/QXTP3P7CEm9V1IdG8lDLY3HhiqpsE/nOwpPw== - once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -4461,16 +4404,6 @@ open@^9.1.0: is-inside-container "^1.0.0" is-wsl "^2.2.0" -openid-client@^5.4.0: - version "5.4.3" - resolved "https://registry.yarnpkg.com/openid-client/-/openid-client-5.4.3.tgz#c75d2f6d07a25d383a72c8ff34605a36b7e2cd73" - integrity sha512-sVQOvjsT/sbSfYsQI/9liWQGVZH/Pp3rrtlGEwgk/bbHfrUDZ24DN57lAagIwFtuEu+FM9Ev7r85s8S/yPjimQ== - dependencies: - jose "^4.14.4" - lru-cache "^6.0.0" - object-hash "^2.2.0" - oidc-token-hash "^5.0.3" - optionator@^0.9.3: version "0.9.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" @@ -4681,18 +4614,6 @@ postcss@8.4.27, postcss@^8, postcss@^8.4.23: picocolors "^1.0.0" source-map-js "^1.0.2" -preact-render-to-string@^5.1.19: - version "5.2.6" - resolved "https://registry.yarnpkg.com/preact-render-to-string/-/preact-render-to-string-5.2.6.tgz#0ff0c86cd118d30affb825193f18e92bd59d0604" - integrity sha512-JyhErpYOvBV1hEPwIxc/fHWXPfnEGdRKxc8gFdAZ7XV4tlzyzG847XAyEZqoDnynP88akM4eaHcSOzNcLWFguw== - dependencies: - pretty-format "^3.8.0" - -preact@^10.6.3: - version "10.16.0" - resolved "https://registry.yarnpkg.com/preact/-/preact-10.16.0.tgz#68a06d70b191b8a313ea722d61e09c6b2a79a37e" - integrity sha512-XTSj3dJ4roKIC93pald6rWuB2qQJO9gO2iLLyTe87MrjQN+HklueLsmskbywEWqCHlclgz3/M4YLL2iBr9UmMA== - prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -4726,18 +4647,6 @@ pretty-format@^29.0.0, pretty-format@^29.6.2: ansi-styles "^5.0.0" react-is "^18.0.0" -pretty-format@^3.8.0: - version "3.8.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-3.8.0.tgz#bfbed56d5e9a776645f4b1ff7aa1a3ac4fa3c385" - integrity sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew== - -prisma@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.1.1.tgz#8f5c0f9467a828746cb94f846d694dc7b7481a9e" - integrity sha512-WJFG/U7sMmcc6TjJTTifTfpI6Wjoh55xl4AzopVwAdyK68L9/ogNo8QQ2cxuUjJf/Wa82z/uhyh3wMzvRIBphg== - dependencies: - "@prisma/engines" "5.1.1" - prompts@^2.0.1: version "2.4.2" resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069"