Skip to content

Commit

Permalink
fix: console error on channels page
Browse files Browse the repository at this point in the history
  • Loading branch information
AXeL-dev committed May 20, 2022
1 parent 3939228 commit 23b8c32
Showing 1 changed file with 26 additions and 28 deletions.
54 changes: 26 additions & 28 deletions src/ui/components/pages/Channels/ChannelList/Actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,41 +99,39 @@ function ChannelListActions(props: ChannelListActionsProps) {
<ListItemText>Toggle drag handles</ListItemText>
</MenuItem>
) : null}
<>
<MenuItem
onClick={() => {
fileInputRef.current?.click();
}}
>
<ListItemIcon>
<UploadIcon />
</ListItemIcon>
<ListItemText>Import</ListItemText>
</MenuItem>
<input
type="file"
ref={fileInputRef}
style={{
display: 'none',
visibility: 'hidden',
overflow: 'hidden',
width: 0,
height: 0,
}}
accept=".json"
onClick={(event: MouseEvent<HTMLInputElement>) => {
event.currentTarget.value = '';
}}
onChange={importChannels}
/>
</>
<MenuItem
onClick={() => {
fileInputRef.current?.click();
}}
>
<ListItemIcon>
<UploadIcon />
</ListItemIcon>
<ListItemText>Import</ListItemText>
</MenuItem>
<MenuItem onClick={exportChannels}>
<ListItemIcon>
<DownloadIcon />
</ListItemIcon>
<ListItemText>Export</ListItemText>
</MenuItem>
</StyledMenu>
<input
type="file"
ref={fileInputRef}
style={{
display: 'none',
visibility: 'hidden',
overflow: 'hidden',
width: 0,
height: 0,
}}
accept=".json"
onClick={(event: MouseEvent<HTMLInputElement>) => {
event.currentTarget.value = '';
}}
onChange={importChannels}
/>
</>
) : null;
}
Expand Down

0 comments on commit 23b8c32

Please sign in to comment.