File tree Expand file tree Collapse file tree 3 files changed +6
-12
lines changed Expand file tree Collapse file tree 3 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,7 @@ export type DsfrHeadProps = {
2121 * Preloading of fonts is only enabled in production.
2222 */
2323 preloadFonts ?: ( keyof typeof fontUrlByFileBasename ) [ ] ;
24- /** Default: <a /> */
25- Link ?: Function ;
24+ Link : Function ;
2625 /**
2726 * When set, the value will be used as the nonce attribute of subsequent script tags.
2827 *
@@ -67,9 +66,7 @@ export function DsfrHead(props: DsfrHeadProps) {
6766 const defaultColorScheme = getDefaultColorSchemeServerSide ( ) ;
6867
6968 useMemo ( ( ) => {
70- if ( Link !== undefined ) {
71- setLink ( { "Link" : Link as any } ) ;
72- }
69+ setLink ( { "Link" : Link as any } ) ;
7370 } , [ Link ] ) ;
7471
7572 return (
Original file line number Diff line number Diff line change @@ -11,9 +11,8 @@ import { setLink } from "../link";
1111
1212export type DsfrProviderProps = {
1313 children : ReactNode ;
14- lang ?: string ;
15- /** Default: <a /> */
16- Link ?: Function ;
14+ lang : string | undefined ;
15+ Link : Function ;
1716 defaultColorScheme : DefaultColorScheme ;
1817} ;
1918
@@ -33,9 +32,7 @@ export function DsfrProvider(props: DsfrProviderProps) {
3332 } , [ lang ] ) ;
3433
3534 useMemo ( ( ) => {
36- if ( Link !== undefined ) {
37- setLink ( { "Link" : Link as any } ) ;
38- }
35+ setLink ( { "Link" : Link as any } ) ;
3936 } , [ Link ] ) ;
4037
4138 if ( isBrowser ) {
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const suppressHydrationWarning = true;
1010
1111export function getHtmlAttributes ( params : {
1212 defaultColorScheme : DefaultColorScheme ;
13- lang ? : string ;
13+ lang : string | undefined ;
1414} ) : { suppressHydrationWarning : true ; lang ?: string } & (
1515 | Record < typeof data_fr_scheme | typeof data_fr_theme , ColorScheme >
1616 | { }
You can’t perform that action at this time.
0 commit comments