Merge pull request #231 from jedmund/fix-grid-rep

Fix GridRep like button and DOM nesting
This commit is contained in:
Justin Edmund 2023-02-03 21:09:14 -08:00 committed by GitHub
commit ab1c090d55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 16 deletions

View file

@ -65,7 +65,7 @@
&.Save {
color: #ff4d4d;
.Accessory svg {
&.Active .Accessory svg {
fill: #ff4d4d;
stroke: #ff4d4d;
}

View file

@ -150,13 +150,10 @@ const GridRep = (props: Props) => {
const linkedAttribution = () => (
<Link href={`/${props.user ? props.user.username : '#'}`}>
<a
className={userClass}
href={`/${props.user ? props.user.username : '#'}`}
>
<span className={userClass}>
{userImage()}
{props.user ? props.user.username : t('no_user')}
</a>
</span>
</Link>
)
@ -214,16 +211,14 @@ const GridRep = (props: Props) => {
((props.user && account.user && account.user.id !== props.user.id) ||
!props.user) ? (
<Link href="#">
<a href="#">
<Button
className="Save"
leftAccessoryIcon={<SaveIcon className="stroke" />}
active={props.favorited}
contained={true}
buttonSize="small"
onClick={sendSaveData}
/>
</a>
<Button
className="Save"
leftAccessoryIcon={<SaveIcon className="stroke" />}
active={props.favorited}
contained={true}
buttonSize="small"
onClick={sendSaveData}
/>
</Link>
) : (
''