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 { &.Save {
color: #ff4d4d; color: #ff4d4d;
.Accessory svg { &.Active .Accessory svg {
fill: #ff4d4d; fill: #ff4d4d;
stroke: #ff4d4d; stroke: #ff4d4d;
} }

View file

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