diff options
author | Ashelyn Rose <git@tempest.dev> | 2023-12-02 16:29:03 -0700 |
---|---|---|
committer | Ashelyn Rose <git@tempest.dev> | 2023-12-02 16:29:03 -0700 |
commit | c74fad179379260dcf46edeae22c1f04ee842508 (patch) | |
tree | 6e5cce69c0b01227599933179cc7be2b230486a0 /components/InfoBar | |
parent | 11aed6e30f3050a1062e37149bba878d485d52a8 (diff) |
Manual static image optimization
Diffstat (limited to 'components/InfoBar')
-rw-r--r-- | components/InfoBar/index.tsx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/components/InfoBar/index.tsx b/components/InfoBar/index.tsx index 2901883..20f7130 100644 --- a/components/InfoBar/index.tsx +++ b/components/InfoBar/index.tsx @@ -1,8 +1,7 @@ import { ReactNode } from 'react' -import Image from 'next/image' +import Image from 'components/Image' import system from '~/config/system.json' -import profilePics from '~/utils/profiles' import styles from './InfoBar.module.css' interface ArbitraryChildrenProps { @@ -39,10 +38,9 @@ export default function InfoBar(props: InfobarProps) { } if ('authorName' in props) { - const authorKey = props.authorName.toLowerCase() const author = system.members.find((member) => member.name === props.authorName) const style = { '--author-color': author?.color } as React.CSSProperties - const picture = profilePics[authorKey] + const picture = author.profileImg return ( <aside className={`${styles.infobar} ${styles.postMeta}`} style={style}> @@ -59,7 +57,7 @@ export default function InfoBar(props: InfobarProps) { const memberKey = props.memberName.toLowerCase() const member = system.members.find((member) => member.name === props.memberName) const style = { '--member-color': member?.color } as React.CSSProperties - const picture = profilePics[memberKey] + const picture = member.profileImg return ( <aside className={`${styles.infobar} ${styles.memberProfile}`} style={style}> |