Skip to content

Commit 232eed0

Browse files
authored
Add link to devtools (#213)
* Add link to devtools * Use current window hostname and port
1 parent 48340a5 commit 232eed0

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/components/notebook/DebugPanel.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
schema,
1010
events,
1111
} from "@runt/schema";
12-
import { Bug } from "lucide-react";
12+
import { Bug, Database } from "lucide-react";
1313
import { Button } from "@/components/ui/button";
1414

1515
interface DebugPanelProps {
@@ -77,6 +77,16 @@ const DebugPanel: React.FC<DebugPanelProps> = ({
7777
</h3>
7878
</div>
7979

80+
<a
81+
target="_blank"
82+
rel="noopener noreferrer"
83+
href={`${window.location.protocol}//${window.location.hostname}${window.location.port ? `:${window.location.port}` : ""}/_livestore/web/${store.storeId}/${store.clientSession.clientId}/${store.sessionId}/default`}
84+
className="hover:bg-muted flex items-center gap-1 border-b px-4 py-2 text-sm text-blue-500 hover:underline"
85+
>
86+
<Database className="size-4" />
87+
LiveStore DevTools →
88+
</a>
89+
8090
<div className="space-y-4 p-4">
8191
{/* Available Tables */}
8292
<div>

0 commit comments

Comments
 (0)