noams24 / Kef-Code

An educational website to help students easily pass tests
https://www.kefcode.com
MIT License
9 stars 19 forks source link

Delete Solution #87

Closed noams24 closed 1 year ago

noams24 commented 1 year ago

When the user want to delete a solution, open a warning modal before it get deleted (clicking on the trash icon) image

The modal should look something like: image

Link to component: https://github.com/noams24/Kef-Code/blob/main/src/layouts/components/modals/DeleteSolutionModal.tsx https://github.com/noams24/Kef-Code/blob/main/src/layouts/components/workSpace/WorkSpace.tsx

amabelleS commented 1 year ago

hey:) I would love to take this issue.

noams24 commented 1 year ago

hey:) I would love to take this issue.

Thanks!

amabelleS commented 1 year ago

I am trying to start working on this issue, but I can't get signed up/in (some bug?) => and I can't save a solution if I'm not signed in.

noams24 commented 1 year ago

I am trying to start working on this issue, but I can't get signed up/in (some bug?) => and I can't save a solution if I'm not signed in.

Sorry for the delay, In the file /store/store, change the line development: process.env.NODE_ENV === "development" to development: process.env.NODE_ENV !== "development" . In addition, you need to add an env file to connect it to a database. I can send you a mock env file via email or you can create your own. Thanks! 馃憤

amabelleS commented 1 year ago

Hey:) There is a .env-example file with this params: DATABASE_URL= NEXTAUTH_SECRET=

GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET=

The question is how do I fill it up - are we using MySQL as a DB?

noams24 commented 1 year ago

Hey:) There is a .env-example file with this params: DATABASE_URL= NEXTAUTH_SECRET=

GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET=

The question is how do I fill it up - are we using MySQL as a DB?

  • Do I need to open a MySQL DB locally for my env, or is there a collective one for development?
  • Do I need to fill in all the secrets? (NEXTAUTH_SECRET, GOOGLE_CLIENT_ID ,GOOGLE_CLIENT_SECRET)
  1. Yes, I am using MySQL.
  2. You can open a local DB and then run the command yarn prisma db push.
  3. In order to log in you need to fill them.

The easiest solution I suggest is that I will send you a env file via email. BTW, because it's a Frontend issue you don't really need all that.

amabelleS commented 1 year ago

Hey:) There is a .env-example file with this params: DATABASE_URL= NEXTAUTH_SECRET= GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET= The question is how do I fill it up - are we using MySQL as a DB?

  • Do I need to open a MySQL DB locally for my env, or is there a collective one for development?
  • Do I need to fill in all the secrets? (NEXTAUTH_SECRET, GOOGLE_CLIENT_ID ,GOOGLE_CLIENT_SECRET)
  1. Yes, I am using MySQL.
  2. You can open a local DB and then run the command yarn prisma db push.
  3. In order to log in you need to fill them.

The easiest solution I suggest is that I will send you a env file via email. BTW, because it's a Frontend issue you don't really need all that.

OK, first I think the .env file will help me to get started. You can send it to: amabelledev@gmail.com

I downloaded MySQL (again, sort of a new laptop), and created the local db. I created a NEXTAUTH_SECRET in my bash terminal. But I think I need the GOOGLE_CLIENT_ID ,GOOGLE_CLIENT_SECRET of the project? I tried to put the ones I created myself, but maybe I'm missing something. That's were I'm stuck now:

image

Error 400: redirect_uri_mismatch

讗讬谉 诇讱 讗驻砖专讜转 诇讛讬讻谞住 诇讗驻诇讬拽爪讬讛 讛讝讜 讻讬 讛讬讗 诇讗 注讜诪讚转 讘讚专讬砖讜转 诪讚讬谞讬讜转 OAuth 2.0 砖诇 Google.

讗诐 讗转/讛 讛诪驻转讞/转 砖诇 讛讗驻诇讬拽爪讬讛, 注诇讬讱 诇专砖讜诐 讘-Google Cloud Console 讗转 讛-URI 砖诇 讛讛驻谞讬讛 讛讗讜讟讜诪讟讬转. Request details: redirect_uri=http://localhost:3000/api/auth/callback/google

noams24 commented 1 year ago

amabelleS

I have sent you the env file, tell me if it works :)

amabelleS commented 1 year ago

amabelleS

I have sent you the env file, tell me if it works :)

Yay, I'm in:)

image

I used the GOOGLE_CLIENT_ID & GOOGLE_CLIENT_SECRET in the .env file that you sent me.