mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
fix missing react key
This commit is contained in:
parent
198de02a65
commit
d3dbac6e77
@ -175,7 +175,7 @@ class MainSideBar extends React.Component<{}, {}> {
|
|||||||
|
|
||||||
getSessions() {
|
getSessions() {
|
||||||
if (!GlobalModel.sessionListLoaded.get()) return <div className="item">loading ...</div>;
|
if (!GlobalModel.sessionListLoaded.get()) return <div className="item">loading ...</div>;
|
||||||
let sessionList = [];
|
let sessionList: Session[] = [];
|
||||||
let activeSessionId = GlobalModel.activeSessionId.get();
|
let activeSessionId = GlobalModel.activeSessionId.get();
|
||||||
for (let session of GlobalModel.sessionList) {
|
for (let session of GlobalModel.sessionList) {
|
||||||
if (!session.archived.get() || session.sessionId == activeSessionId) {
|
if (!session.archived.get() || session.sessionId == activeSessionId) {
|
||||||
@ -189,6 +189,7 @@ class MainSideBar extends React.Component<{}, {}> {
|
|||||||
const sessionRunningCommands = sessionScreens.some((screen) => screen.numRunningCmds.get() > 0);
|
const sessionRunningCommands = sessionScreens.some((screen) => screen.numRunningCmds.get() > 0);
|
||||||
return (
|
return (
|
||||||
<SideBarItem
|
<SideBarItem
|
||||||
|
key={session.sessionId}
|
||||||
className={`${isActive ? "active" : ""}`}
|
className={`${isActive ? "active" : ""}`}
|
||||||
frontIcon={<span className="index">{index + 1}</span>}
|
frontIcon={<span className="index">{index + 1}</span>}
|
||||||
contents={session.name.get()}
|
contents={session.name.get()}
|
||||||
|
Loading…
Reference in New Issue
Block a user