diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-10-09 14:33:29 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-11 18:14:41 +0100 |
| commit | f11a906420975e833f278a08470d8f9783c76f73 (patch) | |
| tree | cd98eb0c73e07d08fbbe3006a2f7d5a34b0464b3 /src/components/molecules/layout/branding.tsx | |
| parent | d75b9a1e150ab211c1052fb49bede9bd16320aca (diff) | |
refactor(components): extract FlippingLogo from Branding component
Diffstat (limited to 'src/components/molecules/layout/branding.tsx')
| -rw-r--r-- | src/components/molecules/layout/branding.tsx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/components/molecules/layout/branding.tsx b/src/components/molecules/layout/branding.tsx index c3d3b7c..9f8e6ce 100644 --- a/src/components/molecules/layout/branding.tsx +++ b/src/components/molecules/layout/branding.tsx @@ -1,6 +1,7 @@ import { type FC, useRef, type ReactNode } from 'react'; import { useStyles } from '../../../utils/hooks'; -import { Flip, FlipSide, Heading, Link } from '../../atoms'; +import { Heading, Link } from '../../atoms'; +import { FlippingLogo } from '../images'; import styles from './branding.module.scss'; export type BrandingProps = { @@ -42,7 +43,6 @@ export const Branding: FC<BrandingProps> = ({ photo, title, withLink = false, - ...props }) => { const baselineRef = useRef<HTMLParagraphElement>(null); const titleRef = useRef<HTMLHeadingElement | HTMLParagraphElement>(null); @@ -61,12 +61,7 @@ export const Branding: FC<BrandingProps> = ({ return ( <div className={styles.wrapper}> - <Flip {...props} className={styles.logo}> - <FlipSide className={styles.flip}>{photo}</FlipSide> - <FlipSide className={styles.flip} isBack> - {logo} - </FlipSide> - </Flip> + <FlippingLogo back={logo} className={styles.logo} front={photo} /> <Heading className={styles.title} isFake={!isHome} |
