nada-abuzaid / sora-dashboard-front

0 stars 0 forks source link

optional: use object instead of if statements #21

Open amjed-98 opened 2 years ago

amjed-98 commented 2 years ago

great work on separating components and reusing them

this is an optional issue , you could just ignore it

in src/pages/auth.js file

since your only changing the value of title inside of the if statements body and not doing any extra logic:

image

I believe an object is perfect for this situation, you could use an object like this to make your code more readable:

image