Skip to content

Commit

Permalink
loading state fixes on dash
Browse files Browse the repository at this point in the history
  • Loading branch information
dvargas92495 committed Dec 23, 2023
1 parent 50ce2a4 commit f960dd0
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/components/StaticSiteDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,14 @@ const WebsiteButton: React.FunctionComponent<
intent: Intent;
loading: boolean;
}
> = ({ children, onConfirm, disabled = false, buttonText, intent, loading }) => {
> = ({
children,
onConfirm,
disabled = false,
buttonText,
intent,
loading,
}) => {
const [isOpen, setIsOpen] = useState(false);
const open = useCallback(() => setIsOpen(true), [setIsOpen]);
const close = useCallback(() => setIsOpen(false), [setIsOpen]);
Expand Down Expand Up @@ -1545,10 +1552,6 @@ const LiveContent: StageContent = () => {
deploys: WebsiteStatus[];
launches: WebsiteStatus[];
isWebsiteReady: boolean;

// DEPRECATED
progress: number;
progressType: WebsiteProgressType;
}>(`website-status?graph=${window.roamAlphaAPI.graph.name}`);
setDeploys(r.deploys);
setLaunches(r.launches);
Expand Down Expand Up @@ -1710,14 +1713,14 @@ const LiveContent: StageContent = () => {
<p>
You're ready to launch your new site! Click the button below to start.
</p>
<div className="flex">
<div className="flex gap-4">
<Button
disabled={buttonsDisabled}
disabled={loading || !!error}
onClick={launchWebsite}
intent={Intent.PRIMARY}
className="mb-16"
style={{ maxWidth: 240 }}
loading={buttonsDisabled}
loading={loading}
>
LAUNCH
</Button>
Expand Down

0 comments on commit f960dd0

Please sign in to comment.