Fix save button states

This commit is contained in:
Justin Edmund 2023-06-24 15:33:55 -07:00
parent d0a29535ae
commit e7f6590d55
2 changed files with 9 additions and 6 deletions

View file

@ -244,11 +244,14 @@ const GridRep = (props: Props) => {
!props.user) ? ( !props.user) ? (
<Link href="#"> <Link href="#">
<Button <Button
className="Save" className={classNames({
save: true,
saved: props.favorited,
})}
leftAccessoryIcon={<SaveIcon className="stroke" />} leftAccessoryIcon={<SaveIcon className="stroke" />}
active={props.favorited} active={props.favorited}
contained={true} bound={true}
buttonSize="small" size="small"
onClick={sendSaveData} onClick={sendSaveData}
/> />
</Link> </Link>

View file

@ -340,8 +340,8 @@ const PartyHeader = (props: Props) => {
<Button <Button
leftAccessoryIcon={<SaveIcon />} leftAccessoryIcon={<SaveIcon />}
className={classNames({ className={classNames({
Save: true, save: true,
Saved: partySnapshot.favorited, saved: partySnapshot.favorited,
})} })}
text={ text={
appState.party.favorited ? t('buttons.saved') : t('buttons.save') appState.party.favorited ? t('buttons.saved') : t('buttons.save')
@ -377,10 +377,10 @@ const PartyHeader = (props: Props) => {
{party.remix && party.sourceParty ? ( {party.remix && party.sourceParty ? (
<Tooltip content={t('tooltips.source')}> <Tooltip content={t('tooltips.source')}>
<Button <Button
className="IconButton"
blended={true} blended={true}
leftAccessoryIcon={<RemixIcon />} leftAccessoryIcon={<RemixIcon />}
text={t('tokens.remix')} text={t('tokens.remix')}
size="icon"
onClick={() => goTo(party.sourceParty?.shortcode)} onClick={() => goTo(party.sourceParty?.shortcode)}
/> />
</Tooltip> </Tooltip>