Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Junhao Liao <[email protected]>
  • Loading branch information
Henry8192 and junhaoliao authored Sep 16, 2024
1 parent b127bbf commit b9ab9dd
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion new-log-viewer/src/contexts/StateContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ const StateContextProvider = ({children}: StateContextProviderProps) => {
switch (code) {
case WORKER_RESP_CODE.CHUNK_DATA:
receivedNumChunksRef.current += 1;
console.log(receivedNumChunksRef.current, args.logs);

// If all chunks are received, trigger the download of the file
if (numChunks === receivedNumChunksRef.current) {
Expand Down
6 changes: 1 addition & 5 deletions new-log-viewer/src/services/LogFileManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,7 @@ class LogFileManager {
`eventIdx=${eventIdx});`);
}

const messages: string[] = [];
results.forEach((r) => {
const [msg] = r;
messages.push(msg);
});
const messages = results.map(([msg]) => msg);

return {
logs: messages.join(""),
Expand Down
1 change: 0 additions & 1 deletion new-log-viewer/src/services/MainWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ dayjs.extend(dayjsUtc);
dayjs.extend(dayjsTimezone);
/* eslint-enable import/no-named-as-default-member */


/**
* Manager for the currently opened log file.
*/
Expand Down

0 comments on commit b9ab9dd

Please sign in to comment.