diff options
Diffstat (limited to 'src/components/templates')
| -rw-r--r-- | src/components/templates/layout/site-header/site-branding.tsx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/components/templates/layout/site-header/site-branding.tsx b/src/components/templates/layout/site-header/site-branding.tsx index f5a845d..76ab653 100644 --- a/src/components/templates/layout/site-header/site-branding.tsx +++ b/src/components/templates/layout/site-header/site-branding.tsx @@ -3,6 +3,8 @@ import { type CSSProperties, forwardRef, type ForwardRefRenderFunction, + useEffect, + useRef, } from 'react'; import { useIntl } from 'react-intl'; import { CONFIG } from '../../../../utils/config'; @@ -32,6 +34,7 @@ const SiteBrandingWithRef: ForwardRefRenderFunction< SiteBrandingProps > = ({ isHome = false, ...props }, ref) => { const intl = useIntl(); + const isFirstRender = useRef(true); const photoAltText = intl.formatMessage( { defaultMessage: '{website} picture', @@ -49,6 +52,10 @@ const SiteBrandingWithRef: ForwardRefRenderFunction< { website: CONFIG.name } ); + useEffect(() => { + isFirstRender.current = false; + }, []); + return ( <Branding {...props} @@ -77,7 +84,9 @@ const SiteBrandingWithRef: ForwardRefRenderFunction< className={styles.title} isFake={!isHome} level={1} - style={brandingTitleStyles} + style={ + isFirstRender.current ? brandingTitleStyles : { animation: 'none' } + } > {CONFIG.name} </Heading> |
