Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

Prevent topbar from jumping when loading (#1436)

Oleg Isonen4a3f8031eac6
diff --git a/apps/builder/app/builder/features/topbar/topbar.tsx b/apps/builder/app/builder/features/topbar/topbar.tsx
index f82a7e9e3a..c8c5ff6828 100644
--- a/apps/builder/app/builder/features/topbar/topbar.tsx
+++ b/apps/builder/app/builder/features/topbar/topbar.tsx
@@ -35,9 +35,6 @@ type TopbarProps = {
export const Topbar = ({ gridArea, project, publish }: TopbarProps) => {
const page = useStore(selectedPageStore);
- if (page === undefined) {
- return null;
- }
return (
<nav className={topbarContainerStyle({ css: { gridArea } })}>
@@ -49,7 +46,7 @@ export const Topbar = ({ gridArea, project, publish }: TopbarProps) => {
align="center"
>
<Text variant="labelsTitleCase" color="contrast" truncate>
- {page.name}
+ {page?.name ?? ""}
</Text>
</Flex>
<Flex css={{ minWidth: theme.spacing[23] }}>