Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 22x 22x 7x 15x 3x 12x | import ProductHero from "./ProductHero";
import DonationTypeHero from "./DonationTypeHero";
import useCheckFormType from "../../hooks/useCheckFormType";
import React, { memo } from "react";
import EventsHero from "./EventsHero";
function HeroSelector({
isPreview,
isPeekMode,
ADBContent,
}: {
isPreview?: boolean;
ADBContent?: React.ReactElement;
isPeekMode?: boolean;
}) {
const { isFundraiser, isSweepstake, isEvent } = useCheckFormType();
if (isFundraiser || isSweepstake)
return <DonationTypeHero isPreview={isPreview} ADBContent={ADBContent} />;
if (isEvent)
return <EventsHero isPreview={isPreview} isPeekMode={isPeekMode} />;
return <ProductHero isPreview={isPreview} />;
}
export default memo(HeroSelector);
|