Skip to content

Commit 39ec5a6

Browse files
committed
Rename config key
1 parent 9d97d81 commit 39ec5a6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

dotcom-rendering/src/client/islands/doHydration.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const doHydration = async (
6363
<ConfigProvider value={config}>
6464
<CacheProvider value={emotionCache}>
6565
{/* Child islands should not be hydrated separately */}
66-
<IslandProvider value={{ child: true }}>
66+
<IslandProvider value={{ isChild: true }}>
6767
{/* The component to hydrate must be a single JSX Element */}
6868
{createElement(module[name], data)}
6969
</IslandProvider>

dotcom-rendering/src/components/Island.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ export const Island = ({ priority, defer, children, role }: IslandProps) => {
6363
const island = useContext(IslandContext);
6464

6565
return (
66-
<IslandProvider value={{ child: true }}>
66+
<IslandProvider value={{ isChild: true }}>
6767
{/* Child islands defer to nearest parent island for hydration */}
68-
{island.child ? (
68+
{island.isChild ? (
6969
children
7070
) : (
7171
<gu-island

dotcom-rendering/src/components/IslandContext.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { createContext } from 'react';
22

33
type Config = {
4-
child: boolean;
4+
isChild: boolean;
55
};
66

77
/**
88
* Context to track whether the current island is a child of another island.
99
* Child islands defer to the nearest parent island for hydration.
1010
*/
11-
export const IslandContext = createContext<Config>({ child: false });
11+
export const IslandContext = createContext<Config>({ isChild: false });
1212

1313
export const IslandProvider = ({
1414
value,

0 commit comments

Comments
 (0)