Spaces:
Running
Running
fix toast
Browse files9 unmodified lines101112131415161718192021222324252627282930 unmodified lines60616263646566676869709 unmodified linesimport { Button } from "../ui/button";import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover";const MsgToast = ({ url }: { url: string }) => (<div className="w-full flex items-center justify-center gap-3">Your space is live!<buttonclassName="bg-black text-sm block text-white rounded-md px-3 py-1.5 hover:bg-gray-900 cursor-pointer"onClick={() => {window.open(url, "_blank");}}>See Space</button></div>);function DeployButton({html,auth,30 unmodified lines});const response = await request.json();if (response.ok) {toast.success(<MsgToasturl={`https://huggingface.co/spaces/${response.path ?? path}`}/>);setPath(response.path);} else {toast.error(response.message);9 unmodified lines10111213141530 unmodified lines46474849505152535455565758596061629 unmodified linesimport { Button } from "../ui/button";import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover";function DeployButton({html,auth,30 unmodified lines});const response = await request.json();if (response.ok) {toast.success("Your space is live! 🎉", {action: {label: "See Space",onClick: () => {window.open(`https://huggingface.co/spaces/${response.path ?? path}`,"_blank");},},});setPath(response.path);} else {toast.error(response.message);
src/components/deploy-button/deploy-button.tsx+11-19