1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Prevent useEffect not firing with because of condition

Signed-off-by: alexfront <alex.andreev.email@gmail.com>
This commit is contained in:
alexfront 2022-09-09 09:59:42 +03:00
parent 64773f3b69
commit 511fc09419

View File

@ -19,11 +19,7 @@ export interface PodLogSearchProps {
export const LogSearch = observer(({ onSearch, model: { logTabData, searchStore, ...model }}: PodLogSearchProps) => { export const LogSearch = observer(({ onSearch, model: { logTabData, searchStore, ...model }}: PodLogSearchProps) => {
const tabData = logTabData.get(); const tabData = logTabData.get();
if (!tabData) { const logs = tabData?.showTimestamps
return null;
}
const logs = tabData.showTimestamps
? model.logs.get() ? model.logs.get()
: model.logsWithoutTimestamps.get(); : model.logsWithoutTimestamps.get();
const { setNextOverlayActive, setPrevOverlayActive, searchQuery, occurrences, activeFind, totalFinds } = searchStore; const { setNextOverlayActive, setPrevOverlayActive, searchQuery, occurrences, activeFind, totalFinds } = searchStore;