Skip to content

Commit

Permalink
Introduce a constant for file unloaded check in FileInfoTabPanel.
Browse files Browse the repository at this point in the history
  • Loading branch information
junhaoliao committed Oct 3, 2024
1 parent 9e078b4 commit f7c38d7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ import CustomTabPanel from "./CustomTabPanel";
*/
const FileInfoTabPanel = () => {
const {fileName, originalFileSizeInBytes} = useContext(StateContext);
const isFileUnloaded = 0 === fileName.length;

return (
<CustomTabPanel
tabName={TAB_NAME.FILE_INFO}
title={TAB_DISPLAY_NAMES[TAB_NAME.FILE_INFO]}
>
{0 === fileName.length ?
{isFileUnloaded ?
"No file is open." :
<List>
<CustomListItem
Expand Down

0 comments on commit f7c38d7

Please sign in to comment.