fix: add asChild prop for DialogTrigger with Button
This commit is contained in:
@@ -167,6 +167,7 @@ function useBaseTemplates() {
|
|||||||
"/base-templates",
|
"/base-templates",
|
||||||
(): Promise<BaseTemplate[]> =>
|
(): Promise<BaseTemplate[]> =>
|
||||||
fetchApi("/base-templates").then((res) => res.json()),
|
fetchApi("/base-templates").then((res) => res.json()),
|
||||||
|
{ refreshInterval: Number.POSITIVE_INFINITY },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -225,7 +225,7 @@ function EditorTopBar() {
|
|||||||
<Dialog>
|
<Dialog>
|
||||||
<header className="sticky top-0 flex shrink-0 items-center justify-between gap-2 border-b bg-background p-4">
|
<header className="sticky top-0 flex shrink-0 items-center justify-between gap-2 border-b bg-background p-4">
|
||||||
<p className="font-bold">{currentFilePath}</p>
|
<p className="font-bold">{currentFilePath}</p>
|
||||||
<DialogTrigger>
|
<DialogTrigger asChild>
|
||||||
<Button>
|
<Button>
|
||||||
{isBuildInProgress ? (
|
{isBuildInProgress ? (
|
||||||
<Loader2 className="animate-spin" />
|
<Loader2 className="animate-spin" />
|
||||||
|
@@ -268,7 +268,7 @@ function DeleteWorkspaceButton({ workspace }: { workspace: Workspace }) {
|
|||||||
function WorkspaceInfoButton() {
|
function WorkspaceInfoButton() {
|
||||||
return (
|
return (
|
||||||
<Dialog>
|
<Dialog>
|
||||||
<DialogTrigger>
|
<DialogTrigger asChild>
|
||||||
<Button variant="outline" size="icon">
|
<Button variant="outline" size="icon">
|
||||||
<Info />
|
<Info />
|
||||||
</Button>
|
</Button>
|
||||||
|
Reference in New Issue
Block a user