mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-04 20:29:01 +00:00
optimize dropdown usage
This commit is contained in:
@@ -139,23 +139,15 @@ const SnippetBar = ({
|
||||
};
|
||||
|
||||
const renderHistoryMenu = ()=>{
|
||||
if(!historyExists) return <Dropdown
|
||||
groupName='History'
|
||||
icon='fas fa-clock-rotate-left'
|
||||
className='history'
|
||||
customTrigger={<><i className='fas fa-clock-rotate-left' /></>}
|
||||
disabled
|
||||
>
|
||||
</Dropdown>;
|
||||
|
||||
return (
|
||||
<Dropdown
|
||||
groupName='History'
|
||||
icon='fas fa-clock-rotate-left'
|
||||
className='history'
|
||||
customTrigger={<><i className='fas fa-clock-rotate-left' /></>}
|
||||
disabled={!historyExists}
|
||||
>
|
||||
{_.map(historyItems, (item, index)=>{
|
||||
{historyExists && _.map(historyItems, (item, index)=>{
|
||||
if(item.noData || !item.savedAt) return null;
|
||||
|
||||
const saveTime = new Date(item.savedAt);
|
||||
|
||||
Reference in New Issue
Block a user