Skip to content

Commit 65d9b9e

Browse files
committed
fix: adjust error display
1 parent 6077f2d commit 65d9b9e

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

src/treeReactApp/pages/History.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ export const History = () => {
1616
<>
1717
<ErrorListItem error={error} />
1818

19-
{data.map((note) => {
20-
return <NoteTreeItem key={note.id} note={note} />;
21-
})}
19+
{!error &&
20+
data.map((note) => {
21+
return <NoteTreeItem key={note.id} note={note} />;
22+
})}
2223
</>
2324
);
2425
};

src/treeReactApp/pages/MyNotes.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ export const MyNotes = () => {
1414

1515
return (
1616
<>
17-
{data.map((note) => {
18-
return <NoteTreeItem key={note.id} note={note} />;
19-
})}
20-
2117
<ErrorListItem error={error} />
18+
19+
{!error &&
20+
data.map((note) => {
21+
return <NoteTreeItem key={note.id} note={note} />;
22+
})}
2223
</>
2324
);
2425
};

src/treeReactApp/pages/TeamNotes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const TeamNotes = () => {
7575
/>
7676
)}
7777

78-
{selectedTeam && <TeamTreeItem team={selectedTeam} />}
78+
{!error && selectedTeam && <TeamTreeItem team={selectedTeam} />}
7979
</>
8080
);
8181
};

0 commit comments

Comments
 (0)