fix(topbar): prevent clicking the subs dropdown if there are no subs

This commit is contained in:
plebeius.eth
2023-10-16 13:00:23 +02:00
parent 28705cf25d
commit 1e6fdfff27

View File

@@ -40,7 +40,7 @@ const TopBar: FC = () => {
{t('topbar_my_subs')}
</span>
</div>
<div className={styles.dropChoices} style={{ display: isClicked ? 'block' : 'none' }}>
<div className={styles.dropChoices} style={{ display: isClicked && subscriptions?.length ? 'block' : 'none' }}>
{subscriptions?.map((subscription: string, index: number) => (
<Link key={index} to={`p/${subscription}`} className={styles.choice} onClick={(event) => event.preventDefault()}>
{subscription}