thtauhid / open-profile

Unified profile to showcase your work.
https://my-open-profile.vercel.app
MIT License
13 stars 14 forks source link

Don't allow duplicate usernames to be stored #70

Open thtauhid opened 10 months ago

thtauhid commented 10 months ago

Currently, when the user searches for any username we store the usernames and show it for future use. When storing the username we are not checking if the user is inputting the same username again or not. We might store same username twice. We need to check if the username already exists in store and prevent duplicate.

image

JoshLamptey commented 10 months ago

this would be easier and less time consuming if you included the function that handles and returns the search result. I don't have to go through thousands of lines of code (unsuccessfully) looking for one function to edit or refactor. Also please if your project is open source consider naming your functions and components well. It will definitely make it easier and less time consuming to work on

SAGARSINGH-1 commented 10 months ago

hey @JoshLamptey if u know about how the last search names is displayed or stored checkout Homepage.tsx component and visit these 2 functions:

image
thtauhid commented 10 months ago

Hi @JoshLamptey thank you for your suggestion. We try to name the functions and variables meaningfully as much as possible. You can follow @SAGARSINGH-1's last comment to know where the function resides.

JoshLamptey commented 10 months ago

We all do the best we can . I'll take a look at it when I get home