kossiitkgp / KWoC-Frontend

Frontend Repo for Kharagpur Winter of Code, built in React
https://kwoc.kossiitkgp.org/
GNU General Public License v3.0
21 stars 40 forks source link

Randomize Projects List #185

Closed harshkhandeparkar closed 9 months ago

harshkhandeparkar commented 9 months ago

The projects list on the projects can be randomized each time for better discovery.

asmitdeb commented 9 months ago

Hi, I would like to work on this, can you help me get started? Also, is this good for beginners?

harshkhandeparkar commented 9 months ago

Hi, I would like to work on this, can you help me get started? Also, is this good for beginners?

Welcome! You can start by looking at this line of code. Here, response.response is an array of projects. The order of this list has to be randomized (shuffled). You can use any library for this or write your own code.

VineeTagarwaL-code commented 9 months ago

i would love to work on this issue , please assign @harshkhandeparkar

harshkhandeparkar commented 9 months ago

i would love to work on this issue , please assign @harshkhandeparkar

@asmitdeb has already requested to work on this. If they don't want to continue, I'll assign this to you.

asmitdeb commented 9 months ago

I cloned the backend and frontend repos, but I am unable to link them together. I am getting this error when building the backend Xnip2023-11-27_19-04-50

Also, in this line, response.response returns a JSON Object right?

harshkhandeparkar commented 9 months ago

I cloned the backend and frontend repos, but I am unable to link them together. I am getting this error when building the backend Xnip2023-11-27_19-04-50

Create a .env file in the frontend repo and copy the contents of the .env.template file to it.

Also, in this line, response.response returns a JSON Object right?

No it should be a Javascript object.

asmitdeb commented 9 months ago

This should work right?

image

Will it count for Kwoc if I make a PR now?

VineeTagarwaL-code commented 9 months ago

no @asmitdeb this wont but who cares make the PR for good

VineeTagarwaL-code commented 9 months ago

yeah this should work , how about adding a async and await here to make sure that it shuffles first and then the project state gets populated ?

asmitdeb commented 9 months ago

I am not exactly familiar with promises, is this fine?

image

Please review the changes @harshkhandeparkar

harshkhandeparkar commented 9 months ago

@asmitdeb could you open a pull request? It would be easier to review it. It is fine if your PR is not complete.

asmitdeb commented 9 months ago

Done @harshkhandeparkar