File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -77,10 +77,6 @@ const SpaceInner: React.FC<IReactSpaceInnerProps & { wrapperInstance: Space }> =
7777 if ( SSR_SUPPORT_ENABLED && ! isServer ( ) ) {
7878 const preRenderedStyle = document . getElementById ( `style_${ idToUse } _ssr` ) ;
7979 if ( preRenderedStyle ) {
80- // const newStyle = document.createElement("style");
81- // newStyle.id = `style_${idToUse}`;
82- // newStyle.innerHTML = preRenderedStyle.innerHTML;
83- // document.head.appendChild(newStyle);
8480 space . ssrStyle = preRenderedStyle . innerHTML ;
8581 }
8682 updateStyleDefinition ( space ) ;
Original file line number Diff line number Diff line change @@ -118,12 +118,14 @@ export function useForceUpdate() {
118118}
119119
120120export function useUniqueId ( ) {
121- if ( React . version . startsWith ( "18" ) ) {
122- return `s${ React . useId ( ) . replace ( / \: / g, "" ) } ` ;
123- }
121+ if ( SSR_SUPPORT_ENABLED ) {
122+ if ( React . version . startsWith ( "18" ) ) {
123+ return `s${ React . useId ( ) . replace ( / \: / g, "" ) } ` ;
124+ }
124125
125- if ( ( React as any ) . unstable_useOpaqueIdentifier ) {
126- return `s${ ( React as any ) . unstable_useOpaqueIdentifier ( ) . replace ( / \: / g, "" ) } ` ;
126+ if ( ( React as any ) . unstable_useOpaqueIdentifier ) {
127+ return `s${ ( React as any ) . unstable_useOpaqueIdentifier ( ) . replace ( / \: / g, "" ) } ` ;
128+ }
127129 }
128130
129131 return `s${ shortuuid ( ) } ` ;
You can’t perform that action at this time.
0 commit comments