= ({ branch }) => {
-
+
+
>
diff --git a/src/pages/updates/announcements/[slug].tsx b/src/pages/updates/announcements/[slug].tsx
index 4d060aa9..8d171f2e 100644
--- a/src/pages/updates/announcements/[slug].tsx
+++ b/src/pages/updates/announcements/[slug].tsx
@@ -36,7 +36,7 @@ import replaceMagicBlocks from 'utils/replaceMagicBlocks'
import escapeCurlyBraces from 'utils/escapeCurlyBraces'
import replaceHTMLBlocks from 'utils/replaceHTMLBlocks'
import { getReleaseDate } from 'components/release-note/functions'
-import { ActionType, getAction } from 'components/last-updates-card/functions'
+import { ActionType, getAction } from 'components/announcement-card/functions'
import styles from 'styles/documentation-page'
import { PreviewContext } from 'utils/contexts/preview'
diff --git a/src/utils/constants.ts b/src/utils/constants.ts
index c7a38c60..611da77a 100644
--- a/src/utils/constants.ts
+++ b/src/utils/constants.ts
@@ -1,6 +1,4 @@
-import APIGuidesIcon from 'components/icons/api-guides-icon'
import AnnouncementIcon from 'components/icons/announcement-icon'
-import DashboardsIcon from 'components/icons/dashboards-icon'
import { getMessages } from 'utils/get-messages'
import {
@@ -16,9 +14,17 @@ import {
UpdatesDataElement,
WhatsNextDataElement,
ResourceDataElement,
+ FaqDataElement,
} from './typings/types'
import { IntlShape } from 'react-intl'
import libraryConfig from './libraryConfig'
+import DeveloperPortalIcon from 'components/icons/developer-portal-icon'
+import StartHereIcon from 'components/icons/start-here-icon'
+import TutorialsIcon from 'components/icons/tutorials-icon'
+import PaperIcon from 'components/icons/paper-icon'
+import WarningIcon from 'components/icons/warning-icon'
+import GraphIcon from 'components/icons/graph-icon'
+import SignalIcon from 'components/icons/signal-icon'
libraryConfig
export const messages = getMessages()
@@ -26,21 +32,36 @@ export const messages = getMessages()
export const documentationData = (intl: IntlShape) => {
const data: DocDataElement[] = [
{
- Icon: APIGuidesIcon,
- title: 'Start here',
+ Icon: StartHereIcon,
+ title: intl.formatMessage({
+ id: 'documentation_start_here.title',
+ }),
description: intl.formatMessage({
- id: 'documentation_api_guides.description',
+ id: 'documentation_start_here.description',
}),
link: '/docs/tracks',
},
{
- Icon: DashboardsIcon,
- title: 'Tutorials & Solutions',
+ Icon: TutorialsIcon,
+ title: intl.formatMessage({
+ id: 'documentation_tutorials.title',
+ }),
description: intl.formatMessage({
- id: 'documentation_api_reference.description',
+ id: 'documentation_tutorials.description',
}),
link: '/docs/tutorial',
},
+ {
+ 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
}
@@ -58,6 +79,113 @@ export const updatesData = (intl: IntlShape) => {
]
return data
}
+
+export const faqData = (intl: IntlShape) => {
+ const data: FaqDataElement[] = [
+ {
+ Icon: PaperIcon,
+ title: intl.formatMessage({
+ id: 'faq_order_error.title',
+ }),
+ description: intl.formatMessage({
+ id: 'faq_order_error.description',
+ }),
+ type: intl.formatMessage({
+ id: 'faq_order_error.type',
+ }),
+ link: '/',
+ },
+ {
+ Icon: WarningIcon,
+ title: intl.formatMessage({
+ id: 'faq_handling.title',
+ }),
+ description: intl.formatMessage({
+ id: 'faq_handling.description',
+ }),
+ type: intl.formatMessage({
+ id: 'faq_handling.type',
+ }),
+ link: '/',
+ },
+ {
+ Icon: GraphIcon,
+ title: intl.formatMessage({
+ id: 'faq_product_visible.title',
+ }),
+ description: intl.formatMessage({
+ id: 'faq_product_visible.description',
+ }),
+ type: intl.formatMessage({
+ id: 'faq_product_visible.type',
+ }),
+ link: '/',
+ },
+ {
+ Icon: PaperIcon,
+ title: intl.formatMessage({
+ id: 'faq_carrier.title',
+ }),
+ description: intl.formatMessage({
+ id: 'faq_carrier.description',
+ }),
+ type: intl.formatMessage({
+ id: 'faq_carrier.type',
+ }),
+ link: '/',
+ },
+ ]
+ return data
+}
+
+export const supportData = (intl: IntlShape) => {
+ const data: DocDataElement[] = [
+ {
+ Icon: WarningIcon,
+ title: intl.formatMessage({
+ id: 'support_known_issues.title',
+ }),
+ description: intl.formatMessage({
+ id: 'support_known_issues.description',
+ }),
+ link: '/known-issues',
+ },
+ {
+ Icon: PaperIcon,
+ title: intl.formatMessage({
+ id: 'support_plans.title',
+ }),
+ description: intl.formatMessage({
+ id: 'support_plans.description',
+ }),
+ link: '/support-plans',
+ },
+ {
+ Icon: SignalIcon,
+ title: intl.formatMessage({
+ id: 'support_health_check.title',
+ }),
+ description: intl.formatMessage({
+ id: 'support_health_check.description',
+ }),
+ isExternalLink: true,
+ link: 'http://healthcheck.vtex.com/',
+ },
+ {
+ Icon: GraphIcon,
+ title: intl.formatMessage({
+ id: 'support_status.title',
+ }),
+ description: intl.formatMessage({
+ id: 'support_status.description',
+ }),
+ isExternalLink: true,
+ link: 'https://status.vtex.com/',
+ },
+ ]
+ return data
+}
+
export const getIcon = (doc: string, intl: IntlShape) => {
return (
documentationData(intl).find((icon) => icon.title === doc)?.Icon ||
diff --git a/src/utils/getReleasesData.ts b/src/utils/getReleasesData.ts
index 5942af6c..facc12b0 100644
--- a/src/utils/getReleasesData.ts
+++ b/src/utils/getReleasesData.ts
@@ -4,7 +4,7 @@ import getGithubFile from './getGithubFile'
import replaceHTMLBlocks from './replaceHTMLBlocks'
import replaceMagicBlocks from './replaceMagicBlocks'
import { UpdateElement } from './typings/types'
-import { ActionType } from 'components/last-updates-card/functions'
+import { ActionType } from 'components/announcement-card/functions'
import { getLogger } from 'utils/logging/log-util'
type IReleasesFrontmatter = {
diff --git a/src/utils/typings/types.ts b/src/utils/typings/types.ts
index e30118bb..7c4d34d6 100644
--- a/src/utils/typings/types.ts
+++ b/src/utils/typings/types.ts
@@ -1,8 +1,8 @@
import { NextPage } from 'next'
import { IconProps } from '@vtex/brand-ui'
-import { ActionType } from 'components/last-updates-card/functions'
-import { DocumentationTitle, UpdatesTitle, ResourceTitle } from './unionTypes'
+import { ActionType } from 'components/announcement-card/functions'
+import { UpdatesTitle, ResourceTitle } from './unionTypes'
// eslint-disable-next-line @typescript-eslint/ban-types
export type Page = NextPage
& {
@@ -19,8 +19,15 @@ export type DataElement = {
description: string
}
export interface DocDataElement extends DataElement {
- title: DocumentationTitle
+ title: string
+ isExternalLink?: boolean
}
+
+export interface FaqDataElement extends DataElement {
+ title: string
+ type: string
+}
+
export interface UpdatesDataElement extends DataElement {
title: UpdatesTitle
}
diff --git a/src/utils/typings/unionTypes.ts b/src/utils/typings/unionTypes.ts
index e37b9c3a..1243882e 100644
--- a/src/utils/typings/unionTypes.ts
+++ b/src/utils/typings/unionTypes.ts
@@ -1,6 +1,9 @@
export type Locale = 'en' | 'pt' | 'es'
-export type DocumentationTitle = 'Start here' | 'Tutorials & Solutions'
+export type DocumentationTitle =
+ | 'Start here'
+ | 'Tutorials & Solutions'
+ | 'Developers Portal'
export type UpdatesTitle = 'News' | 'Documentation Updates'