From 47eea56bcf2cd39e4d26116707bffcbc3aeb41c4 Mon Sep 17 00:00:00 2001 From: dan Date: Wed, 25 May 2022 23:20:06 +0100 Subject: [PATCH] [Beta] Enable Selective Hydration in more places (#4689) * [Beta] Enable Selective Hydration in more places * Fix typo --- beta/src/components/Layout/Nav/MobileNav.tsx | 5 ++++- beta/src/components/Layout/Page.tsx | 17 ++++++++++------- beta/src/components/Layout/Sidebar/Sidebar.tsx | 5 ++++- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/beta/src/components/Layout/Nav/MobileNav.tsx b/beta/src/components/Layout/Nav/MobileNav.tsx index fe96dffc..fee48956 100644 --- a/beta/src/components/Layout/Nav/MobileNav.tsx +++ b/beta/src/components/Layout/Nav/MobileNav.tsx @@ -57,7 +57,10 @@ export function MobileNav() { API - + {/* No fallback UI so need to be careful not to suspend directly inside. */} + + + ); } diff --git a/beta/src/components/Layout/Page.tsx b/beta/src/components/Layout/Page.tsx index e9481b10..777a711f 100644 --- a/beta/src/components/Layout/Page.tsx +++ b/beta/src/components/Layout/Page.tsx @@ -26,14 +26,17 @@ export function Page({routeTree, children}: PageProps) { -
-
-
- {children} -
-
+ {/* No fallback UI so need to be careful not to suspend directly inside. */} + +
+
+
+ {children} +
+
+
-
+
diff --git a/beta/src/components/Layout/Sidebar/Sidebar.tsx b/beta/src/components/Layout/Sidebar/Sidebar.tsx index 8a325a2c..13b999f8 100644 --- a/beta/src/components/Layout/Sidebar/Sidebar.tsx +++ b/beta/src/components/Layout/Sidebar/Sidebar.tsx @@ -42,7 +42,10 @@ export function Sidebar() { {isMobileSidebar ? ( ) : ( - + /* No fallback UI so need to be careful not to suspend directly inside. */ + + + )}