Only show views in Weapon and Summon search

This commit is contained in:
Justin Edmund 2023-08-23 02:43:21 -07:00
parent 8a552f7e3a
commit e7d76879d2

View file

@ -457,15 +457,17 @@ const SearchModal = (props: Props) => {
<h5 className={styles.total}>
{t('search.result_count', { record_count: recordCount })}
</h5>
<div className={styles.viewSwitcher}>
<span>View: </span>
<button className={newestViewClasses} onClick={showNewest}>
Newest
</button>
<button className={recentViewClasses} onClick={showRecent}>
Recently used
</button>
</div>
{(props.object === 'weapons' || props.object === 'summons') && (
<div className={styles.viewSwitcher}>
<span>View: </span>
<button className={newestViewClasses} onClick={showNewest}>
Newest
</button>
<button className={recentViewClasses} onClick={showRecent}>
Recently used
</button>
</div>
)}
</div>
{open ? renderResults() : ''}
</div>