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CAAAA,CAACwD,UAAU,mBAAmB5E,eAAe,SAASM,GAAG,eAC3D,GAAAvB,EAAAC,GAAA,EAAC6F,QAAAA,UACG,gIAMJ,GAAA9F,EAAAC,GAAA,EAAC8F,EAAAA,CAAkBA,CAAAA,CAACC,OAAO,WAAWC,aAAchC,OAEpD,KAEJ,GAAAjE,EAAAC,GAAA,EAAC0F,EAAAA,CAAIA,CAAAA,CAACpE,GAAG,cACP,GAAAvB,EAAAC,GAAA,EAACiG,EAAcA,CAACnE,MAAOuB,EAAiBQ,QAAQ,CAACuB,OAAO,UAKlE","sources":["webpack://_N_E/","webpack://_N_E/./src/components/Common/ViewMenusButton/ViewMenusButton.tsx","webpack://_N_E/./src/components/Common/ViewMenusButton/index.tsx","webpack://_N_E/./src/hooks/useMount.tsx","webpack://_N_E/./src/containers/About/OrderTypeLinks.tsx","webpack://_N_E/./src/pages/index.tsx"],"sourcesContent":["\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/\",\n function () {\n return require(\"private-next-pages/index.tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/\"])\n });\n }\n ","import { Button, Icon, Text } from '@chakra-ui/react';\nimport { ArrowRightIcon } from '@heroicons/react/outline';\nimport { PageRoutes } from 'constants/Routes';\nimport { useRouter } from 'next/router';\nimport { FC } from 'react';\n\ninterface IViewMenusButtonProps {\n /** @deprecated FIXME: This prop should be deleted. Use the Chakra styling system instead. */\n size?: 'lg' | 'md';\n /** Whether to render as a button (primary action) or a link (secondary action) */\n as: 'button' | 'link';\n}\n\nconst VIEW_MENUS = 'View Menus';\n\nconst ViewMenusButton: FC = ({ size = 'lg', as: renderAs }) => {\n const router = useRouter();\n const handleOrderNowClick = () => router.push(PageRoutes.ORDER);\n\n const showArrow = renderAs === 'button';\n\n const commonProps = {\n color: 'white',\n borderRadius: '11px',\n onClick: handleOrderNowClick,\n } as const;\n\n const linkProps = {\n variant: 'link',\n } as const;\n\n const buttonProps = {\n _hover: {\n bg: 'brand.400',\n },\n _active: {\n bg: 'brand.400',\n },\n background: 'primary',\n } as const;\n\n return size === 'lg' ? (\n \n \n \n ) : undefined\n }\n {...commonProps}\n {...(renderAs === 'button' ? buttonProps : linkProps)}>\n {VIEW_MENUS}\n \n ) : (\n }\n {...commonProps}\n {...(renderAs === 'button' ? buttonProps : linkProps)}>\n {VIEW_MENUS}\n \n );\n};\nexport default ViewMenusButton;\n","import ViewMenusButton from './ViewMenusButton';\n\nexport default ViewMenusButton;\n","import { useEffect, useState } from 'react';\n\nconst useMount = () => {\n const [mounted, setMounted] = useState(false);\n useEffect(() => {\n setMounted(true);\n }, []);\n\n return { mounted };\n};\nexport default useMount;\n","import { Box, Text, VStack } from '@chakra-ui/react';\nimport ViewMenusButton from 'components/Common/ViewMenusButton';\nimport { FC } from 'react';\n\ninterface IOrderTypeLinksProps {\n title: string;\n}\n\nconst OrderTypeLinks: FC = ({ title }) => {\n return (\n \n {title}\n \n \n \n \n );\n};\nexport default OrderTypeLinks;\n","import 'react-google-reviews/dist/index.css';\n\nimport { GraphQLResult } from '@aws-amplify/api-graphql';\nimport { Box, Container, Flex } from '@chakra-ui/react';\nimport { GetBusinessMetadataInput, GetBusinessPromotedScheduleQuery } from 'API';\nimport { getBusinessPromotedScheduleFn } from 'api/query-functions/business';\nimport { useGetBusinessPromotedSchedule } from 'api/query-hooks/business';\nimport AppLayout from 'components/AppLayout';\nimport { REFERRAL_CODE_QUERY_PARAM } from 'constants/index';\nimport { PageRoutes } from 'constants/Routes';\nimport OrderTypeLinks from 'containers/About/OrderTypeLinks';\nimport { useAppContext } from 'context/AppContext';\nimport { CustomPromotedSchedule, ICommonAppProps } from 'custom-types';\nimport useMount from 'hooks/useMount';\nimport { QueryKeys } from 'models/react-query';\nimport { GetServerSideProps } from 'next';\nimport dynamic from 'next/dynamic';\nimport { useRouter } from 'next/router';\nimport { ReactGoogleReviews } from 'react-google-reviews';\nimport { dehydrate } from 'react-query';\nimport { fetchQueryHelper, ssrAuthHandler, wrapGetServerSideProps } from 'ssr';\nimport CookieStorageHelpers from 'utils/helpers/CookieStorageHelpers';\n\nconst HomeFeaturedProducts = dynamic(() => import('containers/Home/HomeFeaturedProducts'));\nconst HomeHowItWorksSection = dynamic(() => import('containers/Home/HomeHowItWorksSection'));\nconst HomeSubscribeAndSaveSection = dynamic(\n () => import('containers/Home/HomeSubscribeAndSaveSection')\n);\nconst TestimonialSection = dynamic(() => import('containers/Home/TestimonialSection'));\nconst HomeHeroSection = dynamic(() => import('containers/Home/HomeHeroSection'));\n\nconst Home = ({ businessMetadata }: ICommonAppProps) => {\n const { mounted } = useMount();\n const { businessId } = useAppContext();\n const router = useRouter();\n\n const {\n howItWorks,\n testimonials,\n showPromotePlans,\n coverImage,\n headline,\n featuredProducts,\n promotePlansText,\n featurableWidgetId,\n } = businessMetadata;\n\n const promotedScheduleQuery = useGetBusinessPromotedSchedule(\n { businessId },\n { refetchInterval: 60000 }\n );\n if (promotedScheduleQuery.isLoading) {\n return <>;\n }\n\n if (promotedScheduleQuery.isError || !promotedScheduleQuery.data) {\n return router.push(PageRoutes.SERVER_DOWN);\n }\n\n const promotedSchedule = promotedScheduleQuery.data.data?.getBusinessMetadata?.promotedSchedule;\n\n let customPromotedSchedule: CustomPromotedSchedule | undefined;\n if (promotedSchedule) {\n customPromotedSchedule = {\n id: promotedSchedule.id,\n type: promotedSchedule.type,\n orderCutoff: promotedSchedule.orderCutoff,\n orderReadyEnd: promotedSchedule.orderReadyEnd,\n pickupAddressId: promotedSchedule.pickupAddress?.id,\n };\n }\n\n return (\n \n \n \n {mounted && featuredProducts.length ? (\n \n ) : null}\n\n \n\n {showPromotePlans && }\n\n {testimonials.length >= 0 ? (\n \n ) : (\n \n )}\n\n {mounted && featurableWidgetId ? (\n \n \n \n \n ) : null}\n\n \n \n \n \n \n );\n};\n\nexport default Home;\n\nexport const getServerSideProps: GetServerSideProps = wrapGetServerSideProps(\n 'Home',\n async (context) => {\n using ssrOutput = await ssrAuthHandler(context, false);\n const { cognito, queryClient, businessId, consumerId, businessMetadata, isLoginRequired, SSR } =\n ssrOutput.pageContext;\n\n const referralCode = context.query[REFERRAL_CODE_QUERY_PARAM] as string;\n if (referralCode) {\n CookieStorageHelpers.setReferralCodeToStorage(referralCode, context);\n }\n\n await fetchQueryHelper<\n GraphQLResult,\n GetBusinessMetadataInput\n >(\n [QueryKeys.BUSINESS_PROMOTED_SCHEDULE, { businessId }],\n getBusinessPromotedScheduleFn,\n queryClient,\n SSR.API\n );\n\n return {\n props: {\n businessId,\n businessMetadata,\n cognito,\n dehydratedState: dehydrate(queryClient),\n consumerId: consumerId ?? null,\n metadata: { isLoginRequired },\n } satisfies ICommonAppProps,\n };\n }\n);\n"],"names":["window","__NEXT_P","push","__webpack_require__","VIEW_MENUS","Common_ViewMenusButton","size","as","renderAs","param","router","useRouter","commonProps","color","borderRadius","onClick","PageRoutes","ORDER","linkProps","variant","buttonProps","_hover","bg","_active","background","jsx_runtime","jsx","Button","height","fontSize","lineHeight","rightIcon","showArrow","Icon","ArrowRightIcon","undefined","Text","paddingRight","base","md","boxShadow","padding","justifyContent","width","letterSpacing","fontWeight","textTransform","position","mb","__webpack_exports__","Z","mounted","setMounted","useState","useEffect","About_OrderTypeLinks","title","jsxs","VStack","p","w","gap","Box","ViewMenusButton","HomeFeaturedProducts","dynamic","Promise","all","e","then","bind","HomeHowItWorksSection","HomeSubscribeAndSaveSection","TestimonialSection","HomeHeroSection","pages","promotedScheduleQuery","promotedSchedule","customPromotedSchedule","businessMetadata","useMount","businessId","useAppContext","howItWorks","testimonials","showPromotePlans","coverImage","headline","featuredProducts","promotePlansText","featurableWidgetId","useGetBusinessPromotedSchedule","refetchInterval","isLoading","Fragment","isError","data","SERVER_DOWN","getBusinessMetadata","id","type","orderCutoff","orderReadyEnd","pickupAddressId","pickupAddress","AppLayout","showNavigationLinks","showFooter","showBanner","primaryText","primary","secondaryText","secondary","Container","maxW","length","Flex","py","className","style","ReactGoogleReviews","layout","featurableId","OrderTypeLinks"],"sourceRoot":""}