Skip to content

Commit 2e7de06

Browse files
committed
hideButtonSometimes
1 parent e35caeb commit 2e7de06

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

internal/dev_server/ui/src/EventsTable.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,14 @@ const EventsTable = ({
153153
return (
154154
<div>
155155
<h3>Events Stream (limit: {limit})</h3>
156-
<button
157-
className={`streaming-toggle-button ${isStreaming ? 'streaming' : 'not-streaming'}`}
158-
onClick={() => handleToggleStreaming(!isStreaming)}
159-
>
160-
{isStreaming ? 'Streaming ON' : 'Streaming OFF'}
161-
</button>
156+
{onToggleStreaming && (
157+
<button
158+
className={`streaming-toggle-button ${isStreaming ? 'streaming' : 'not-streaming'}`}
159+
onClick={() => handleToggleStreaming(!isStreaming)}
160+
>
161+
{isStreaming ? 'Streaming ON' : 'Streaming OFF'}
162+
</button>
163+
)}
162164
<table className="events-table">
163165
<thead>
164166
<tr>

0 commit comments

Comments
 (0)