This repository was archived by the owner on Jan 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1- import { PreviewServerCSS } from 'typedcssx/next' ;
1+ import { ServerStylePreview } from 'typedcssx/next' ;
22import 'styles/typedcssx-global.css' ;
33
44export default function RootLayout ( { children } : { children : React . ReactNode } ) {
55 return (
66 < html lang = "en" >
77 < head >
8- < PreviewServerCSS anchorEnabled = { true } />
8+ < ServerStylePreview />
99 </ head >
1010 < body > { children } </ body >
1111 </ html >
Original file line number Diff line number Diff line change 1- export { PreviewServerCSS } from '../src/core/component/server-css ' ;
1+ export { ServerStylePreview } from '../src/core/component/server-style-preview ' ;
Original file line number Diff line number Diff line change 11import { getServerCSS } from '../../_internal/utils/inject-server-css' ;
22import { isDevServer } from '../../_internal/utils/helper' ;
3- import { ReloadAnchorComponent } from './reload-link ' ;
3+ import { RefreshOnNavigate } from './refresh-on-navigate ' ;
44
5- export const PreviewServerCSS = ( { anchorEnabled = false } : { anchorEnabled ?: boolean } ) : JSX . Element | null => {
5+ export const ServerStylePreview = ( ) : JSX . Element | null => {
66 if ( ! isDevServer ) return null ;
77
88 const serverCSS = getServerCSS ( ) ;
99
1010 return (
1111 < >
12- { anchorEnabled && < ReloadAnchorComponent /> }
12+ < RefreshOnNavigate />
1313 < style dangerouslySetInnerHTML = { { __html : serverCSS } } />
1414 </ >
1515 ) ;
You can’t perform that action at this time.
0 commit comments