@@ -37,6 +37,16 @@ export type FooterProps = {
3737 alt : string ;
3838 } ;
3939 license ?: ReactNode ;
40+ /** If not provided the brandTop from the Header will be used,
41+ * Be aware that if your Header is not used as a server component while the Footer is
42+ * you need to provide the brandTop to the Footer.
43+ */
44+ brandTop ?: ReactNode ;
45+ /** If not provided the homeLinkProps from the Header will be used,
46+ * Be aware that if your Header is not used as a server component while the Footer is
47+ * you need to provide the homeLinkProps to the Footer.
48+ */
49+ homeLinkProps ?: RegisteredLinkProps & { title : string } ;
4050 classes ?: Partial <
4151 Record <
4252 | "root"
@@ -151,14 +161,36 @@ export const Footer = memo(
151161 partnersLogos,
152162 operatorLogo,
153163 license,
164+ brandTop : brandTop_prop ,
165+ homeLinkProps : homeLinkProps_prop ,
154166 style,
155167 linkList,
156168 ...rest
157169 } = props ;
158170
159171 assert < Equals < keyof typeof rest , never > > ( ) ;
160172
161- const { brandTop, homeLinkProps } = getBrandTopAndHomeLinkProps ( ) ;
173+ const { brandTop, homeLinkProps } = ( ( ) => {
174+
175+ const wrap = getBrandTopAndHomeLinkProps ( ) ;
176+
177+ const brandTop = brandTop_prop ?? wrap ?. brandTop ;
178+ const homeLinkProps = homeLinkProps_prop ?? wrap ?. homeLinkProps ;
179+
180+ const exceptionMessage = " hasn't been provided to the Footer and we cannot retrieve it from the Header (it's probably client side)" ;
181+
182+ if ( brandTop === undefined ) {
183+ throw new Error ( symToStr ( { brandTop } ) + exceptionMessage ) ;
184+ }
185+
186+ if ( homeLinkProps === undefined ) {
187+ throw new Error ( symToStr ( { homeLinkProps } ) + exceptionMessage ) ;
188+ }
189+
190+ return { brandTop, homeLinkProps} ;
191+
192+ } ) ( ) ;
193+
162194
163195 const { Link } = getLink ( ) ;
164196
0 commit comments