Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit b028c38

Browse files
authored
Merge pull request #34 from tinybirdco/fix/mockingbird
Fix widget open behaviour
2 parents 4b0fcbe + 5bdf781 commit b028c38

File tree

4 files changed

+35
-32
lines changed

4 files changed

+35
-32
lines changed

dashboard/components/MockingbirdWidget.tsx

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -63,32 +63,35 @@ export default function MockingbirdWidget() {
6363
'text-white p-3 bg-blue-500 hover:bg-blueHover1',
6464
open && 'bg-blueHover2 hover:bg-blueHover2'
6565
)}
66+
disabled={isGenerating}
6667
>
6768
<CogIcon />
6869
</Popover.Button>
6970

70-
<Popover.Panel className="z-[2] absolute w-[213.3px] top-11 -right-[42.15px] flex flex-col shadow gap-2 bg-white rounded p-2">
71-
<TextInput
72-
value={token}
73-
onChange={e => setToken(e.target.value)}
74-
placeholder="Token"
75-
/>
76-
<TextInput
77-
value={host}
78-
onChange={e => setHost(e.target.value)}
79-
placeholder="Host"
80-
/>
81-
<TextInput
82-
value={eps}
83-
onChange={e => setEPS(e.target.value)}
84-
placeholder="EPS"
85-
/>
86-
<TextInput
87-
value={limit}
88-
onChange={e => setLimit(e.target.value)}
89-
placeholder="Limit"
90-
/>
91-
</Popover.Panel>
71+
{open && !isGenerating && (
72+
<Popover.Panel className="z-[2] absolute w-[213.3px] top-11 -right-[42.15px] flex flex-col shadow gap-2 bg-white rounded p-2">
73+
<TextInput
74+
value={token}
75+
onChange={e => setToken(e.target.value)}
76+
placeholder="Token"
77+
/>
78+
<TextInput
79+
value={host}
80+
onChange={e => setHost(e.target.value)}
81+
placeholder="Host"
82+
/>
83+
<TextInput
84+
value={eps}
85+
onChange={e => setEPS(e.target.value)}
86+
placeholder="EPS"
87+
/>
88+
<TextInput
89+
value={limit}
90+
onChange={e => setLimit(e.target.value)}
91+
placeholder="Limit"
92+
/>
93+
</Popover.Panel>
94+
)}
9295
</>
9396
)}
9497
</Popover>

dashboard/lib/types/credentials.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export enum HostType {
2-
Eu = 'https://ui.tinybird.co',
3-
Us = 'https://ui.us-east.tinybird.co',
2+
Eu = 'https://api.tinybird.co',
3+
Us = 'https://api.us-east.tinybird.co',
44
Other = 'other',
55
}

dashboard/package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dashboard/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"dependencies": {
1515
"@headlessui/react": "^1.7.5",
16-
"@tinybirdco/mockingbird": "^1.0.2",
16+
"@tinybirdco/mockingbird": "^1.0.4",
1717
"@tremor/react": "^1.5.0",
1818
"cross-fetch": "^3.1.5",
1919
"moment": "^2.29.4",

0 commit comments

Comments
 (0)