acmcsufoss / fullyhacks

🐘 FullyHacks hackathon event, an ACM at CSUF production.
https://fullyhacks.acmcsuf.com/
MIT License
7 stars 6 forks source link

Centered component, removed ternary in Team component #63

Closed tomasohCHOM closed 6 months ago

tomasohCHOM commented 6 months ago

Resolves #38 (kinda)

Also, removed the ternary inside /src/components/LandingPage/Team/Team.tsx:

className={`cursor-pointer rounded-[50%] ${
                member.tag == 'Design'
                  ? 'bg-[#FB3E3E]'
                  : member.tag == 'Marketing'
                    ? 'bg-[rgb(20,71,255)]'
                    : member.tag == 'Operation'
                      ? 'bg-[#56FF71]'
                      : member.tag == 'Web'
                        ? 'bg-[#EE9292]'
                        : member.tag == 'Finance'
                          ? 'bg-[#FCFF60]'
                          : 'bg-[#C614E4]'
              } p-1 object-cover h-20 w-20 md:h-28 md:w-28`}

to just using an Enum and:

className={`cursor-pointer rounded-[50%] bg-[${
                TeamMemberTagColor[
                  member.tag as keyof typeof TeamMemberTagColor
                ]
              }] p-1 object-cover h-20 w-20 md:h-28 md:w-28`}

Format is only messed up in the Preview.