Skip to content

Commit 31c988f

Browse files
committed
small fix
1 parent a8ffe72 commit 31c988f

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "remix-development-tools",
33
"description": "Remix development tools.",
44
"author": "Alem Tuzlak",
5-
"version": "1.2.0",
5+
"version": "1.2.1",
66
"license": "MIT",
77
"keywords": [
88
"remix",

src/RemixDevTools/tabs/TerminalTab.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,9 @@ const Terminal = ({ onClose, terminal, projectCommands }: TerminalProps) => {
144144

145145
const TerminalTab = () => {
146146
const { terminals, addOrRemoveTerminal } = useRDTContext();
147-
148147
const [projectCommands, setProjectCommands] =
149148
useState<Record<string, string>>();
150149
const { sendJsonMessage } = useGetSocket({
151-
onOpen: () => {
152-
sendJsonMessage({ type: "commands" });
153-
},
154150
onMessage: (message) => {
155151
try {
156152
const data = JSON.parse(message.data);
@@ -163,6 +159,9 @@ const TerminalTab = () => {
163159
},
164160
});
165161

162+
useEffect(() => {
163+
sendJsonMessage({ type: "commands" });
164+
}, [sendJsonMessage]);
166165
return (
167166
<div className="rdt-relative rdt-mr-8 rdt-flex rdt-h-full rdt-justify-between rdt-gap-4 rdt-rounded-lg">
168167
{terminals.length < 3 && (

0 commit comments

Comments
 (0)