code style: npm run format

This commit is contained in:
Danny Liu 2024-04-04 20:07:52 -07:00
parent b8790200e9
commit c8f7bb990c

View file

@ -111,7 +111,13 @@ export const generateInitialsImage = (name) => {
ctx.textBaseline = 'middle';
const sanitizedName = name.trim();
const initials = sanitizedName.length > 0 ? sanitizedName[0] + (sanitizedName.split(' ').length > 1 ? sanitizedName[sanitizedName.lastIndexOf(' ') + 1] : '') : '';
const initials =
sanitizedName.length > 0
? sanitizedName[0] +
(sanitizedName.split(' ').length > 1
? sanitizedName[sanitizedName.lastIndexOf(' ') + 1]
: '')
: '';
ctx.fillText(initials.toUpperCase(), canvas.width / 2, canvas.height / 2);