Skip to content

Commit

Permalink
fix: Inifinite pending state for the "Build and download static site"…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
istarkov authored Nov 22, 2024
1 parent eaf39c5 commit c537a6a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions apps/builder/app/builder/features/topbar/publish.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ const getStaticPublishStatusAndText = ({
publishStatus,
}: {
updatedAt: string;
publishStatus: string;
publishStatus: "PENDING" | "FAILED" | "PUBLISHED";
}) => {
let status = publishStatus;

Expand Down Expand Up @@ -411,8 +411,7 @@ const PublishStatic = ({

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

const isPublishInProgress =
project.latestStaticBuild?.publishStatus === "PENDING" || isPending;
const isPublishInProgress = status === "PENDING" || isPending;

return (
<Flex gap={2} shrink={false} direction={"column"}>
Expand Down

0 comments on commit c537a6a

Please sign in to comment.