Skip to content

Commit c537a6a

Browse files
authored
fix: Inifinite pending state for the "Build and download static site" button (#4460)
## Description Cherry pick from release ## Steps for reproduction 1. click button 2. expect xyz ## Code Review - [ ] hi @kof, I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 0000) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env` file
1 parent eaf39c5 commit c537a6a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

apps/builder/app/builder/features/topbar/publish.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ const getStaticPublishStatusAndText = ({
361361
publishStatus,
362362
}: {
363363
updatedAt: string;
364-
publishStatus: string;
364+
publishStatus: "PENDING" | "FAILED" | "PUBLISHED";
365365
}) => {
366366
let status = publishStatus;
367367

@@ -411,8 +411,7 @@ const PublishStatic = ({
411411

412412
const [isPending, setIsPendingOptimistic] = useOptimistic(false);
413413

414-
const isPublishInProgress =
415-
project.latestStaticBuild?.publishStatus === "PENDING" || isPending;
414+
const isPublishInProgress = status === "PENDING" || isPending;
416415

417416
return (
418417
<Flex gap={2} shrink={false} direction={"column"}>

0 commit comments

Comments
 (0)