Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
davemarco committed Sep 12, 2024
1 parent b345d8c commit 0f36094
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
14 changes: 10 additions & 4 deletions new-log-viewer/src/components/StatusBar/LogLevelFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ import {
LOG_LEVEL_VALUES_LIST,
} from "../../typings/logs";


export default function LogLevelFilter () {
/**
* Renders log level filter
*
* @return
*/
const LogLevelFilter = () => {
const [selectedLogLevels, setSelectedLogLevels] = useState<LOG_LEVEL[]>([
...LOG_LEVEL_VALUES_LIST,
]);
Expand Down Expand Up @@ -44,7 +48,7 @@ export default function LogLevelFilter () {
<Select

// Convert selected log levels to strings for value.
multiple
multiple={true}
sx={{minWidth: "13rem"}}
value={selectedLogLevels.map(String)}
slotProps={{
Expand All @@ -68,4 +72,6 @@ export default function LogLevelFilter () {
))}
</Select>
);
}
};

export default LogLevelFilter;
3 changes: 2 additions & 1 deletion new-log-viewer/src/contexts/StateContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ const StateContextProvider = ({children}: StateContextProviderProps) => {

const loadPage = (newPageNum: number) => {
if (null === mainWorkerRef.current) {

console.error("Unexpected null mainWorkerRef.current");
return;
}
Expand Down Expand Up @@ -322,6 +323,7 @@ const StateContextProvider = ({children}: StateContextProviderProps) => {
value={{
beginLineNumToLogEventNum: beginLineNumToLogEventNumRef.current,
fileName: fileName,
changeLogLevelFilter: changeLogLevelFilter,
firstLogEventNumPerPage: firstLogEventNumPerPage.current,
lastLogEventNumPerPage: lastLogEventNumPerPage.current,
logData: logData,
Expand All @@ -330,7 +332,6 @@ const StateContextProvider = ({children}: StateContextProviderProps) => {
numFilteredEvents: numFilteredEvents.current,
numPages: numPagesRef.current,
pageNum: pageNumRef.current,
changeLogLevelFilter: changeLogLevelFilter,
loadFile: loadFile,
loadPage: loadPage,
}}
Expand Down

0 comments on commit 0f36094

Please sign in to comment.