diff --git a/public/landing_page_announcements.json b/public/landing_page_announcements.json new file mode 100644 index 00000000..d5abf574 --- /dev/null +++ b/public/landing_page_announcements.json @@ -0,0 +1,44 @@ +{ + "announcements": [ + { + "title": { + "en": "Get Order JSON now delivers new variables in order calculations", + "es": "JSON de Get Order entrega ahora nuevas variables de cálculos de pedido", + "pt": "JSON do Get Order entrega agora novas variáveis de cálculos do pedido" + }, + "date": "2019-03-20T18:06:17.876Z" + }, + { + "title": { + "en": "Extensions Hub: Expand your operation through the VTEX Admin", + "es": "Hub de extensiones: amplía tu operación a través del Admin VTEX", + "pt": "Hub de Extensões: Estenda a sua operação pelo Admin VTEX" + }, + "date": "2023-05-31T22:15:06.695Z" + }, + { + "title": { + "en": "VTEX Pick and Pack: a new solution to manage your fulfillment operation", + "es": "VTEX Pick and Pack: nueva solución para gestionar tu operación logística", + "pt": "VTEX Pick and Pack: nova solução para gerenciar sua operação de fulfillment" + }, + "date": "2023-06-04T20:48:18.798Z" + }, + { + "title": { + "en": "Introducing the new Shipping Strategy interfaces", + "es": "Descubre las nuevas interfaces de Estrategia de envío", + "pt": "Conheça as novas interfaces da Estratégia de envio" + }, + "date": "2023-05-31T15:49:13.447Z" + }, + { + "title": { + "en": "Black Week: VTEX Dashboards Analysis Strategies", + "es": "Black Week: VTEX Dashboards Analysis Strategies", + "pt": "Black Week: VTEX Dashboards Analysis Strategies" + }, + "date": "2024-02-19T15:49:13.447Z" + } + ] +} \ No newline at end of file diff --git a/src/components/announcement-section/index.tsx b/src/components/announcement-section/index.tsx index b0d311cb..06670532 100644 --- a/src/components/announcement-section/index.tsx +++ b/src/components/announcement-section/index.tsx @@ -1,41 +1,21 @@ import { Box, Button, Flex, Text } from '@vtex/brand-ui' - -import { CardProps } from '../announcement-timeline-card' import { useIntl } from 'react-intl' import styles from './styles' import AnnouncementTimelineCard from '../announcement-timeline-card' +import Link from 'next/link' -const lastAnnouncements: CardProps[] = [ - { - title: 'Black Week: VTEX Dashboards Analysis Strategies', - description: 'Deprecation of apps-graphql@2.x', - date: new Date('03/02/2023'), - }, - { - title: 'Black Week: VTEX Dashboards Analysis Strategies', - description: 'Deprecation of apps-graphql@2.x', - date: new Date('03/02/2023'), - }, - { - title: 'Black Week: VTEX Dashboards Analysis Strategies', - description: 'Deprecation of apps-graphql@2.x', - date: new Date('03/02/2023'), - }, - { - title: 'Black Week: VTEX Dashboards Analysis Strategies', - description: 'Deprecation of apps-graphql@2.x', - date: new Date('03/02/2023'), - }, - { - title: 'Black Week: VTEX Dashboards Analysis Strategies', - description: 'Deprecation of apps-graphql@2.x', - date: new Date('03/02/2023'), - }, -] +interface AnnouncementSectionProps { + announcements: { title: string; date: string }[] +} -const AnnouncementSection = () => { +const AnnouncementSection = ({ announcements }: AnnouncementSectionProps) => { const intl = useIntl() + const newAnnouncements = announcements + .map((announcement) => { + return { title: announcement.title, date: new Date(announcement.date) } + }) + .sort((a, b) => b.date.getTime() - a.date.getTime()) return ( @@ -47,11 +27,15 @@ const AnnouncementSection = () => { - + - + + + + + ) } diff --git a/src/components/announcement-section/styles.ts b/src/components/announcement-section/styles.ts index 060a3955..1ba9017b 100644 --- a/src/components/announcement-section/styles.ts +++ b/src/components/announcement-section/styles.ts @@ -25,9 +25,12 @@ const cardsContainer: SxStyleProp = { } const button: SxStyleProp = { + transition: 'all 0.3s ease-out', +} + +const buttonContainer: SxStyleProp = { mt: ['31px', '60px', '60px', '54px', '69px', '58px'], display: ['block', 'block', 'block', 'block', 'block', 'none'], - transition: 'all 0.3s ease-out', } export default { @@ -35,4 +38,5 @@ export default { sectionContainer, title, button, + buttonContainer, } diff --git a/src/components/announcement-timeline-card/index.tsx b/src/components/announcement-timeline-card/index.tsx index d08ebed9..a72a7a33 100644 --- a/src/components/announcement-timeline-card/index.tsx +++ b/src/components/announcement-timeline-card/index.tsx @@ -8,9 +8,8 @@ import styles from './styles' import MegaphoneIcon from 'components/icons/megaphone-icon' import NewIcon from 'components/icons/new-icon' -export interface CardProps { +export interface AnnouncementTimelineCardProps { title: string - description: string date: Date first?: boolean } @@ -19,7 +18,7 @@ const AnnouncementTimelineItem = ({ title, date, first = false, -}: CardProps) => { +}: AnnouncementTimelineCardProps) => { const intl = useIntl() return ( @@ -30,12 +29,13 @@ const AnnouncementTimelineItem = ({ first ? ( New ) : ( - + {title} ) } icon={first ? : null} > - {title} + {first && {title}} + {first && } {`${getDaysElapsed(date)} ${intl.formatMessage({ id: 'relese-note-days-elapsed', @@ -47,11 +47,15 @@ const AnnouncementTimelineItem = ({ } interface Props { - announcements: CardProps[] + announcements: AnnouncementTimelineCardProps[] } const AnnouncementTimelineCard = ({ announcements }: Props) => { const intl = useIntl() + const currentDate = new Date() + const sevenDaysAgo = new Date(currentDate) + sevenDaysAgo.setDate(currentDate.getDate() - 7) + return ( @@ -72,13 +76,13 @@ const AnnouncementTimelineCard = ({ announcements }: Props) => { {announcements.map((announcement, index) => { - return index === 0 ? ( + const isNew = announcement.date >= sevenDaysAgo + + return ( - ) : ( - ) })} diff --git a/src/components/announcement-timeline-card/styles.ts b/src/components/announcement-timeline-card/styles.ts index cf221b21..34529494 100644 --- a/src/components/announcement-timeline-card/styles.ts +++ b/src/components/announcement-timeline-card/styles.ts @@ -2,7 +2,7 @@ import { SxStyleProp } from '@vtex/brand-ui' const cardContainer: SxStyleProp = { mt: ['16px', '24px', '24px', '32px'], - px: ['16px', '24px', '24px', '96px'], + px: ['16px', '24px', '24px', '48px'], py: ['16px', '64px', '64px'], justifyContent: 'center', backgroundColor: 'white', @@ -10,7 +10,7 @@ const cardContainer: SxStyleProp = { border: '1px solid #E7E9EE', transition: 'all 0.3s ease-out', color: '#5E6E84', - columnGap: '50px', + columnGap: '96px', rowGap: '64px', flexWrap: 'wrap', @@ -69,7 +69,7 @@ const timeLineBar: SxStyleProp = { }, mb: '4px', }, - '& > :nth-of-type(2)': { + '& > :nth-child(2)': { width: '1px', borderRadius: '0.5rem', }, @@ -80,6 +80,7 @@ const timeLineBar: SxStyleProp = { padding: '0', '& > :nth-of-type(2)': { mt: '10px', + mb: '32px', }, }, } @@ -104,7 +105,7 @@ const newTitle: SxStyleProp = { } const placeholder: SxStyleProp = { - height: '18px', + height: '10px', width: '1px', } diff --git a/src/components/documentation-section-card/index.tsx b/src/components/documentation-section-card/index.tsx index 34589308..06a61837 100644 --- a/src/components/documentation-section-card/index.tsx +++ b/src/components/documentation-section-card/index.tsx @@ -2,9 +2,8 @@ import Link from 'next/link' import { Flex, Text } from '@vtex/brand-ui' import type { DocDataElement } from 'utils/typings/types' -import Tooltip from 'components/tooltip' import styles from './styles' -import { useEffect, useRef, useState } from 'react' +import { useRef } from 'react' import { useIntl } from 'react-intl' import LongArrowIcon from 'components/icons/long-arrow-icon' @@ -16,68 +15,47 @@ const DocumentationSectionCard = ({ isExternalLink = false, }: DocDataElement) => { const intl = useIntl() - const [tooltipState, setTooltipState] = useState(false) - const [tooltipDescription, setTooltipDescription] = useState(description) const descriptionRef = useRef() - useEffect(() => { - const resizeObserver = new MutationObserver(function (entries) { - const target = entries[0].target as HTMLElement - if (target.offsetHeight < target.scrollHeight) setTooltipState(true) - else setTooltipState(false) - setTooltipDescription(target.innerText) - }) - if (descriptionRef.current) { - resizeObserver.observe(descriptionRef.current, { - childList: true, - }) - } - return () => { - resizeObserver.disconnect - } - }, [descriptionRef.current]) - return ( - - - - - - - {title} - - - {description} - - - + + + + + {title} + + - {!isExternalLink ? ( - + {description} + + + + {!isExternalLink ? ( + + {intl.formatMessage({ + id: 'landing_page_documentation_card.learnMoreText', + })} + + ) : ( + + {intl.formatMessage({ - id: 'landing_page_documentation_card.learnMoreText', + id: 'landing_page_documentation_card.accessPortal', })} - ) : ( - - - {intl.formatMessage({ - id: 'landing_page_documentation_card.accessPortal', - })} - - - - )} - + + + )} - - + + ) } diff --git a/src/components/documentation-section-card/styles.ts b/src/components/documentation-section-card/styles.ts index e329be93..7e883c14 100644 --- a/src/components/documentation-section-card/styles.ts +++ b/src/components/documentation-section-card/styles.ts @@ -2,7 +2,6 @@ import { SxStyleProp } from '@vtex/brand-ui' const cardContainer: SxStyleProp = { flexDirection: 'column', - margin: '16px', width: '282px', height: '293px', boxSizing: 'initial', diff --git a/src/components/documentation-section/styles.ts b/src/components/documentation-section/styles.ts index a8c8866a..7d937983 100644 --- a/src/components/documentation-section/styles.ts +++ b/src/components/documentation-section/styles.ts @@ -20,6 +20,7 @@ const cardsContainer: SxStyleProp = { width: ['100%', '100%', '100%', '100%', '1000px', '100%'], justifyContent: 'center', flexWrap: 'wrap', + gap: '32px', } export default { diff --git a/src/components/faq-section-card/index.tsx b/src/components/faq-section-card/index.tsx index 656291a2..2e7fe249 100644 --- a/src/components/faq-section-card/index.tsx +++ b/src/components/faq-section-card/index.tsx @@ -2,63 +2,31 @@ import Link from 'next/link' import { Flex, Text } from '@vtex/brand-ui' import type { FaqDataElement } from 'utils/typings/types' -import Tooltip from 'components/tooltip' import styles from './styles' -import { useEffect, useRef, useState } from 'react' +import Tag from 'components/tag' const FaqSectionCard = ({ - Icon, title, description, - type, + productTeam, link, }: FaqDataElement) => { - const [tooltipState, setTooltipState] = useState(false) - const [tooltipDescription, setTooltipDescription] = useState(description) - const descriptionRef = useRef() - - useEffect(() => { - const resizeObserver = new MutationObserver(function (entries) { - const target = entries[0].target as HTMLElement - if (target.offsetHeight < target.scrollHeight) setTooltipState(true) - else setTooltipState(false) - setTooltipDescription(target.innerText) - }) - if (descriptionRef.current) { - resizeObserver.observe(descriptionRef.current, { - childList: true, - }) - } - return () => { - resizeObserver.disconnect - } - }, [descriptionRef.current]) - return ( - - - - - - - {type} - - - - - {title} - - - {description} - - + + + + {productTeam} + + + + {title} + + + {description} + - - + + ) } diff --git a/src/components/faq-section/index.tsx b/src/components/faq-section/index.tsx index a7abf780..c8d6f66d 100644 --- a/src/components/faq-section/index.tsx +++ b/src/components/faq-section/index.tsx @@ -5,6 +5,7 @@ import { faqData } from 'utils/constants' import styles from './styles' import { useIntl } from 'react-intl' import FaqSectionCard from 'components/faq-section-card' +import Link from 'next/link' const FaqSection = () => { const intl = useIntl() @@ -23,18 +24,26 @@ const FaqSection = () => { })} - + + + + + {faqData(intl).map((card) => ( ))} - + + + + + ) } diff --git a/src/components/faq-section/styles.ts b/src/components/faq-section/styles.ts index 68a8b0c8..48142653 100644 --- a/src/components/faq-section/styles.ts +++ b/src/components/faq-section/styles.ts @@ -38,13 +38,16 @@ const cardsContainer: SxStyleProp = { flexWrap: 'wrap', } -const leftButton: SxStyleProp = { +const button: SxStyleProp = { + transition: 'all 0.3s ease-out', +} + +const leftButtonContainer: SxStyleProp = { mt: '106px', display: ['none', 'none', 'none', 'none', 'none', 'block'], - transition: 'all 0.3s ease-out', } -const bottomButton: SxStyleProp = { +const bottomButtonContainer: SxStyleProp = { mt: ['16px', '16px', '96px', '96px', '106px', '106px'], display: ['block', 'block', 'block', 'block', 'block', 'none'], transition: 'all 0.3s ease-out', @@ -56,6 +59,7 @@ export default { titleContainer, title, description, - leftButton, - bottomButton, + leftButtonContainer, + bottomButtonContainer, + button, } diff --git a/src/components/support-section-card/index.tsx b/src/components/support-section-card/index.tsx index a70d0177..a39f119e 100644 --- a/src/components/support-section-card/index.tsx +++ b/src/components/support-section-card/index.tsx @@ -2,9 +2,8 @@ import Link from 'next/link' import { Flex, Text } from '@vtex/brand-ui' import type { DocDataElement } from 'utils/typings/types' -import Tooltip from 'components/tooltip' import styles from './styles' -import { useEffect, useRef, useState } from 'react' +import { useRef } from 'react' import { useIntl } from 'react-intl' import LongArrowIcon from 'components/icons/long-arrow-icon' @@ -16,70 +15,49 @@ const SupportSectionCard = ({ isExternalLink = false, }: DocDataElement) => { const intl = useIntl() - const [tooltipState, setTooltipState] = useState(false) - const [tooltipDescription, setTooltipDescription] = useState(description) const descriptionRef = useRef() - useEffect(() => { - const resizeObserver = new MutationObserver(function (entries) { - const target = entries[0].target as HTMLElement - if (target.offsetHeight < target.scrollHeight) setTooltipState(true) - else setTooltipState(false) - setTooltipDescription(target.innerText) - }) - if (descriptionRef.current) { - resizeObserver.observe(descriptionRef.current, { - childList: true, - }) - } - return () => { - resizeObserver.disconnect - } - }, [descriptionRef.current]) - return ( - - - - - - - {title} - - - - - {description} - - - + + + + + {title} + + + + - {!isExternalLink ? ( - + {description} + + + + {!isExternalLink ? ( + + {intl.formatMessage({ + id: 'landing_page_documentation_card.learnMoreText', + })} + + ) : ( + + {intl.formatMessage({ - id: 'landing_page_documentation_card.learnMoreText', + id: 'landing_page_documentation_card.accessPortal', })} - ) : ( - - - {intl.formatMessage({ - id: 'landing_page_documentation_card.accessPortal', - })} - - - - )} - + + + )} - - + + ) } diff --git a/src/components/support-section-card/styles.ts b/src/components/support-section-card/styles.ts index c6f95cd8..3ea589ef 100644 --- a/src/components/support-section-card/styles.ts +++ b/src/components/support-section-card/styles.ts @@ -2,7 +2,6 @@ import { SxStyleProp } from '@vtex/brand-ui' const cardContainer: SxStyleProp = { flexDirection: 'column', - margin: '16px', width: '290px', height: '293px', boxSizing: 'initial', diff --git a/src/components/support-section/styles.ts b/src/components/support-section/styles.ts index 9423a0d3..0842b68b 100644 --- a/src/components/support-section/styles.ts +++ b/src/components/support-section/styles.ts @@ -25,6 +25,7 @@ const contentCards: SxStyleProp = { alignItems: 'center', justifyContent: 'center', flex: '0 0 50%', + gap: '32px', } export default { diff --git a/src/messages/en.json b/src/messages/en.json index 23bf8572..46f06a4f 100644 --- a/src/messages/en.json +++ b/src/messages/en.json @@ -16,16 +16,12 @@ "landing_page_faq.button": "See all questions", "faq_order_error.title": "Order errors in marketplace integrations", "faq_order_error.description": "These errors are commonly related to one of the following situations.", - "faq_order_error.type": "Support guidelines", "faq_handling.title": "Why has my order stopped on “Ready for Handling”?", "faq_handling.description": "Ready for Handling is an order flow status awaiting registration the tax receipt in order to invoice it.", - "faq_handling.type": "Known issues", "faq_product_visible.title": "Why is the product not visible on the website?", "faq_product_visible.description": "This article explains the main means of investigating what adjustments must be made to the product settings.", - "faq_product_visible.type": "Status", "faq_carrier.title": "Why can't I see my carrier on checkout?", "faq_carrier.description": "We have listed five scenarios in which such errors occur along with their respective solutions.", - "faq_carrier.type": "Support guidelines", "updates_documentation_updates.title": "Documentation Updates", "updates_documentation_updates.description": "A log of all notable changes made to our docs.", "landing_page_documentation_card.learnMoreText": "Learn more", diff --git a/src/messages/es.json b/src/messages/es.json index 39215cf7..1288fbb5 100644 --- a/src/messages/es.json +++ b/src/messages/es.json @@ -16,16 +16,12 @@ "landing_page_faq.button": "Ver todas las preguntas", "faq_order_error.title": "Errores de integración de pedidos en marketplaces", "faq_order_error.description": "Entenda como identificar errores en pedidos externos.", - "faq_order_error.type": "Directrices de soporte", "faq_handling.title": "¿Por qué está mi pedido parado en “Listo para preparar“?", "faq_handling.description": "Listo para preparar es un status del flujo de pedidos en que se espera el catastro de la nota fiscal para la factura.", - "faq_handling.type": "Problemas conocidos", "faq_product_visible.title": "¿Por qué el producto no aparece en el sitio web?", "faq_product_visible.description": "Los principales puntos a revisar en el Admin VTEX para ver qué se debe corregir en las configuraciones del producto.", - "faq_product_visible.type": "Status", "faq_carrier.title": "¿Por qué mi transportista no aparece en el checkout?", "faq_carrier.description": "Separamos cinco escenarios en que este error ocurre y sus respectivas soluciones.", - "faq_carrier.type": "Directrices de soporte", "updates_documentation_updates.title": "Documentation Updates", "updates_documentation_updates.description": "A log of all notable changes made to our docs.", "landing_page_documentation_card.learnMoreText": "Aprenda más", diff --git a/src/messages/pt.json b/src/messages/pt.json index ddc0382d..cf92080f 100644 --- a/src/messages/pt.json +++ b/src/messages/pt.json @@ -14,18 +14,14 @@ "landing_page_faq.title": "Perguntas frequentes", "landing_page_faq.description": "Encontre respostas para dúvidas mais frequentes de forma rápida e prática.", "landing_page_faq.button": "Ver todas as perguntas", - "faq_order_error.title": "Erros de integração depedidos de marketplaces", + "faq_order_error.title": "Erros de integração de pedidos de marketplaces", "faq_order_error.description": "Entenda como identificar erros em pedidos externos.", - "faq_order_error.type": "Diretrizes de suporte", "faq_handling.title": "Por que meu pedido está parado em “Preparando entrega”?", "faq_handling.description": "Preparando Entrega é um status do fluxo de pedidos em que se espera o cadastro da nota fiscal para a fatura.", - "faq_handling.type": "Problemas conhecidos", "faq_product_visible.title": "Por que o produto não aparece no site?", "faq_product_visible.description": "Para um produto aparecer disponível na loja ele precisa ser atendido pela logística configurada na loja.", - "faq_product_visible.type": "Status", "faq_carrier.title": "Por que minha transportadora não aparece no checkout?", "faq_carrier.description": "Separamos cinco cenários em que esse comportamento ocorre e suas respectivas soluções.", - "faq_carrier.type": "Diretrizes de suporte", "updates_documentation_updates.title": "Documentation Updates", "updates_documentation_updates.description": "A log of all notable changes made to our docs.", "landing_page_documentation_card.learnMoreText": "Saiba mais", @@ -48,7 +44,7 @@ "landing_page_education_community.title": "Pergunte a comunidade", "landing_page_education_community.description": "Encontre soluções e compartilhe ideias na comunidade VTEX.", "landing_page_education_community.textLink": "Junte-se à nossa comunidade", - "landing_page_support.title": "Recursos adicionais", + "landing_page_support.title": "Recursos de suporte", "landing_page_footer_developer_portal.message": "Developers Portal", "landing_page_footer_site_map.message": "Mapa do site", "landing_page_footer_github.message": "Github", diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 44b50661..e586ac16 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -13,12 +13,15 @@ import { useContext } from 'react' import { PreviewContext } from 'utils/contexts/preview' import SupportSection from 'components/support-section' import FaqSection from 'components/faq-section' +import { localeType } from 'utils/navigation-utils' +import getAnnouncementsJson from 'utils/getAnnouncementsJson' interface Props { branch: string + announcementTimelineData: { title: string; date: string }[] } -const Home: Page = ({ branch }) => { +const Home: Page = ({ branch, announcementTimelineData }) => { const { setBranchPreview } = useContext(PreviewContext) setBranchPreview(branch) @@ -42,7 +45,7 @@ const Home: Page = ({ branch }) => { - + ) @@ -51,6 +54,7 @@ const Home: Page = ({ branch }) => { Home.hideSidebar = true export const getStaticProps: GetStaticProps = async ({ + locale, preview, previewData, }) => { @@ -60,10 +64,32 @@ export const getStaticProps: GetStaticProps = async ({ ? JSON.parse(JSON.stringify(previewData)).branch : 'main' const branch = preview ? previewBranch : 'main' + const currentLocale: localeType = locale + ? (locale as localeType) + : ('en' as localeType) + + const announcementTimelineData: { + title: string + date: string + }[] = [] + + const announcementJson = await getAnnouncementsJson() + + for (let i = 0; i < announcementJson.length; i++) { + const announcement = announcementJson[i] + announcementTimelineData.push({ + title: announcement.title[currentLocale], + date: String(announcement.date), + }) + + announcementTimelineData.push() + } + return { props: { sidebarfallback, branch, + announcementTimelineData, }, } } diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 7cb832e1..dab30438 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -53,6 +53,18 @@ export const documentationData = (intl: IntlShape) => { }), link: '/docs/tutorial', }, + { + id: 'Developers Portal', + Icon: DeveloperPortalIcon, + title: intl.formatMessage({ + id: 'documentation_developers_portal.title', + }), + description: intl.formatMessage({ + id: 'documentation_developers_portal.description', + }), + link: 'https://developers.vtex.com/', + isExternalLink: true, + }, ] return data } @@ -229,10 +241,8 @@ export const faqData = (intl: IntlShape) => { description: intl.formatMessage({ id: 'faq_order_error.description', }), - type: intl.formatMessage({ - id: 'faq_order_error.type', - }), - link: '/', + productTeam: 'Channels', + link: '/faq/order-errors-in-marketplace-integrations', }, { Icon: WarningIcon, @@ -242,10 +252,8 @@ export const faqData = (intl: IntlShape) => { description: intl.formatMessage({ id: 'faq_handling.description', }), - type: intl.formatMessage({ - id: 'faq_handling.type', - }), - link: '/', + productTeam: 'Post-purchase', + link: '/faq/why-has-my-order-stopped-on-ready-for-handling', }, { Icon: GraphIcon, @@ -255,10 +263,8 @@ export const faqData = (intl: IntlShape) => { description: intl.formatMessage({ id: 'faq_product_visible.description', }), - type: intl.formatMessage({ - id: 'faq_product_visible.type', - }), - link: '/', + productTeam: 'Marketing & Merchandising', + link: '/faq/why-is-the-product-not-visible-on-the-website', }, { Icon: PaperIcon, @@ -268,10 +274,8 @@ export const faqData = (intl: IntlShape) => { description: intl.formatMessage({ id: 'faq_carrier.description', }), - type: intl.formatMessage({ - id: 'faq_carrier.type', - }), - link: '/', + productTeam: 'Post-purchase', + link: '/faq/why-cant-i-see-my-carrier-on-checkout', }, ] return data @@ -299,7 +303,7 @@ export const supportData = (intl: IntlShape) => { description: intl.formatMessage({ id: 'support_plans.description', }), - link: '/support-plans', + link: '/', }, { id: 'Health Check', diff --git a/src/utils/getAnnouncementsJson.ts b/src/utils/getAnnouncementsJson.ts new file mode 100644 index 00000000..3e4efb4b --- /dev/null +++ b/src/utils/getAnnouncementsJson.ts @@ -0,0 +1,5 @@ +import announcementsJson from '../../public/landing_page_announcements.json' + +export default async function getAnnouncementsJson() { + return announcementsJson.announcements +} diff --git a/src/utils/typings/types.ts b/src/utils/typings/types.ts index 10f658c4..8af91f6d 100644 --- a/src/utils/typings/types.ts +++ b/src/utils/typings/types.ts @@ -26,7 +26,7 @@ export interface DocDataElement extends DataElement { export interface FaqDataElement extends DataElement { title: string - type: string + productTeam: string } export interface UpdatesDataElement extends DataElement {