diff --git a/web/components/Campaign/Home/ApplicationsCampaignInsert.tsx b/web/components/Campaign/Home/ApplicationsCampaignInsert.tsx index d02a37e..3dc62e3 100644 --- a/web/components/Campaign/Home/ApplicationsCampaignInsert.tsx +++ b/web/components/Campaign/Home/ApplicationsCampaignInsert.tsx @@ -8,6 +8,7 @@ import Link from '~components/Link' import useCampaignContext from '~components/Campaign/useCampaignContext' import { format } from '~utils/date' import ApplicationCounter from '~components/Campaign/ApplicationCounter' +import { motion } from 'framer-motion' const ApplicationsCampaignInsert = () => { const { currentCampaign } = useCampaignContext() @@ -19,8 +20,12 @@ const ApplicationsCampaignInsert = () => { bgColor="white" borderRadius={{ base: 'none', lg: 'lg' }} p={4} + as={motion.div} alignItems="flex-start" height={'100%'} + initial={{ boxShadow: 'inset 0 0 0px 0px rgba(235, 164, 10, 0)' }} + animate={{ boxShadow: 'inset 0 0 2px 4px rgba(235, 164, 10, 0.3)' }} + transition="3s linear" > {title} diff --git a/web/components/Home/HomeCampaignActions.tsx b/web/components/Home/HomeCampaignActions.tsx new file mode 100644 index 0000000..f624556 --- /dev/null +++ b/web/components/Home/HomeCampaignActions.tsx @@ -0,0 +1,55 @@ +import useCampaignContext from '~components/Campaign/useCampaignContext' +import { Box, Stack } from '@chakra-ui/react' +import HomeSearch from '~components/Home/HomeSearch' +import ApplicationsCampaignInsert from '~components/Campaign/Home/ApplicationsCampaignInsert' +import DisponibilitiesCampaingInsert from '~components/Campaign/Home/DisponibilitiesCampaignInsert' +import { motion } from 'framer-motion' + +const HomeCampaignActions = () => { + const { + hasActiveCampaign, + currentCampaign, + isCampaignPlace, + } = useCampaignContext() + + return ( + + + + + {hasActiveCampaign && ( + + + {currentCampaign?.mode === 'applications' && ( + + )} + {currentCampaign?.mode === 'disponibilities' && isCampaignPlace && ( + + )} + + + )} + + ) +} +export default HomeCampaignActions