Skip to content

Commit

Permalink
Better messages
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeyer2115 authored Sep 21, 2023
1 parent 62e427a commit dec0eeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/studio-ui/src/components/OpenLivePreviewButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ function getLivePreviewUrl(
if (isEntityPage) {
return entityData?.id
? Result.ok(`${PAGES_JS_LANDING_PAGE}/${pageName}/${entityData.id}`)
: Result.err(new Error("Bad"));
: Result.err(new Error("Cannot create Preview URL for Entity Page"));
}

const getPathVal = pagesJSState.getPathValue;
return !!getPathVal
? Result.ok(`${PAGES_JS_LANDING_PAGE}/${getPathVal.value}`)
: Result.err(new Error("Bad"));
: Result.err(new Error("Cannot create Preview URL for Static Page"));
}

0 comments on commit dec0eeb

Please sign in to comment.