boolean-uk / team-dev-frontend-client

1 stars 11 forks source link

Update Components that are using InitialsApi #232

Closed lucianosimoni closed 1 year ago

lucianosimoni commented 1 year ago

Wait for issue #180 to be merged. Git pull and then work.

The InitialsApi being used in some components will be useless soon due to a new feature that is being merged #180

Files using this API (To be updated):

What to replace:

<img
    src={`https://avatars.dicebear.com/api/initials/${fullName}.svg`}
    alt="student initials"
></img>

The replacer:

import InitialsBox from '....... relative path here ......'

...

<div className="initials-box-wrapper">
    <InitialsBox firstWord={"put Cohort/Student name in here"} secondWord={"put Student second name here"} />
</div>

Why the wrapper?

Because the <InitialsBox> does not have a width and a height defined in its core. So we need a wrapper to give the elements those CSS atributes.

🧙‍♂️