11import { useGetHelp } from '~/components/sign-in/hooks/use-get-help' ;
22import { LOCALIZATION_NEEDED } from '~/constants/localizations' ;
3- import { useAppearance } from '~/contexts ' ;
3+ import { useCard } from '~/hooks/use-card ' ;
44import { useDevModeWarning } from '~/hooks/use-dev-mode-warning' ;
5- import { useDisplayConfig } from '~/hooks/use-display-config' ;
65import { useLocalizations } from '~/hooks/use-localizations' ;
76import { useSupportEmail } from '~/hooks/use-support-email' ;
87import { Button } from '~/primitives/button' ;
@@ -12,29 +11,16 @@ import { LinkButton } from '~/primitives/link';
1211
1312export function SignInGetHelp ( ) {
1413 const { t } = useLocalizations ( ) ;
15- const { applicationName, branded, logoImageUrl, homeUrl } = useDisplayConfig ( ) ;
16- const { layout } = useAppearance ( ) . parsedAppearance ;
1714 const isDev = useDevModeWarning ( ) ;
1815 const supportEmail = useSupportEmail ( ) ;
1916 const { setShowHelp } = useGetHelp ( ) ;
20-
21- const cardLogoProps = {
22- href : layout ?. logoLinkUrl || homeUrl ,
23- src : layout ?. logoImageUrl || logoImageUrl ,
24- alt : applicationName ,
25- } ;
26- const cardFooterProps = {
27- branded,
28- helpPageUrl : layout ?. helpPageUrl ,
29- privacyPageUrl : layout ?. privacyPageUrl ,
30- termsPageUrl : layout ?. termsPageUrl ,
31- } ;
17+ const { logoProps, footerProps } = useCard ( ) ;
3218
3319 return (
3420 < Card . Root banner = { isDev ? LOCALIZATION_NEEDED . developmentMode : null } >
3521 < Card . Content >
3622 < Card . Header >
37- < Card . Logo { ...cardLogoProps } />
23+ < Card . Logo { ...logoProps } />
3824 < Card . Title > { t ( 'signIn.alternativeMethods.getHelp.title' ) } </ Card . Title >
3925 < Card . Description > { t ( 'signIn.alternativeMethods.getHelp.content' ) } </ Card . Description >
4026 </ Card . Header >
@@ -51,7 +37,7 @@ export function SignInGetHelp() {
5137 < LinkButton onClick = { ( ) => setShowHelp ( false ) } > { t ( 'backButton' ) } </ LinkButton >
5238 </ Card . Actions >
5339 </ Card . Content >
54- < Card . Footer { ...cardFooterProps } />
40+ < Card . Footer { ...footerProps } />
5541 </ Card . Root >
5642 ) ;
5743}
0 commit comments