mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
ca69d44d80
commit
abcbadb46b
1 file changed
+2
-8
@@ -3,7 +3,7 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import React, { createRef, useEffect, useState } from "react";
|
||||
import React, { createRef, useEffect } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { InfoPanel } from "../info-panel";
|
||||
import { LogResourceSelector } from "./resource-selector";
|
||||
@@ -34,18 +34,12 @@ interface Dependencies {
|
||||
const NonInjectedLogsDockTab = observer(({ className, tab, model, subscribeStores }: Dependencies & LogsDockTabProps) => {
|
||||
const logListElement = createRef<LogList>();
|
||||
const data = model.logTabData.get();
|
||||
const [tabIds, setTabIds] = useState([]);
|
||||
|
||||
if (!tabIds.find(id => tab.id === id)) {
|
||||
setTabIds([...tabIds, tab.id]);
|
||||
model.reloadLogs();
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
model.reloadLogs();
|
||||
|
||||
return model.stopLoadingLogs;
|
||||
}, []);
|
||||
}, [tab.id]);
|
||||
useEffect(() => subscribeStores([
|
||||
podsStore,
|
||||
], {
|
||||
|
||||
Reference in new issue
Block a user