File tree 2 files changed +7
-9
lines changed
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 }> =
77
77
if ( SSR_SUPPORT_ENABLED && ! isServer ( ) ) {
78
78
const preRenderedStyle = document . getElementById ( `style_${ idToUse } _ssr` ) ;
79
79
if ( preRenderedStyle ) {
80
- // const newStyle = document.createElement("style");
81
- // newStyle.id = `style_${idToUse}`;
82
- // newStyle.innerHTML = preRenderedStyle.innerHTML;
83
- // document.head.appendChild(newStyle);
84
80
space . ssrStyle = preRenderedStyle . innerHTML ;
85
81
}
86
82
updateStyleDefinition ( space ) ;
Original file line number Diff line number Diff line change @@ -118,12 +118,14 @@ export function useForceUpdate() {
118
118
}
119
119
120
120
export 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
+ }
124
125
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
+ }
127
129
}
128
130
129
131
return `s${ shortuuid ( ) } ` ;
You can’t perform that action at this time.
0 commit comments