From 9386571aa4a879e4f4c719d5b95f4cc8d7de59dd Mon Sep 17 00:00:00 2001 From: Mike Surowiec Date: Thu, 22 Jul 2021 15:29:00 -0400 Subject: [PATCH] fix: use named export for all-versions (#20478) * fix: use named export for all-versions * run prettier --- components/DefaultLayout.tsx | 3 +- components/article/ArticlePage.tsx | 7 +- components/context/ProductLandingContext.tsx | 6 +- components/landing/GuideCard.tsx | 2 +- components/landing/TableOfContents.tsx | 36 +++--- lib/all-versions.js | 3 +- lib/frontmatter.js | 14 ++- lib/get-applicable-versions.js | 2 +- lib/non-enterprise-default-version.js | 4 +- lib/old-versions-utils.js | 4 +- lib/page-data.js | 4 +- lib/path-utils.js | 2 +- lib/permalink.js | 2 +- lib/redirects/get-old-paths-from-permalink.js | 4 +- lib/redirects/permalinks.js | 2 +- .../plugins/rewrite-legacy-asset-paths.js | 2 +- .../plugins/rewrite-local-links.js | 2 +- lib/rest/index.js | 3 +- lib/rewrite-local-links.js | 2 +- lib/search/versions.js | 2 +- middleware/context.js | 2 +- middleware/contextualizers/graphql.js | 2 +- middleware/contextualizers/webhooks.js | 2 +- .../update-developer-site-links.js | 6 +- .../content-migrations/use-short-versions.js | 8 +- .../remove-redirects.js | 20 +-- .../remove-static-files.js | 2 +- .../remove-version-markup.js | 12 +- .../create-graphql-files.js | 2 +- .../create-rest-files.js | 2 +- .../create-webhook-files.js | 2 +- .../release-banner.js | 2 +- script/graphql/update-files.js | 2 +- script/helpers/get-liquid-conditionals.js | 81 ++++++------ script/helpers/get-version-blocks.js | 23 ++-- .../helpers/remove-deprecated-frontmatter.js | 19 +-- script/helpers/remove-liquid-statements.js | 119 ++++++++++-------- script/search/sync.js | 2 +- script/update-internal-links.js | 6 +- tests/browser/browser.js | 23 ++-- tests/content/graphql.js | 6 +- tests/content/remove-liquid-statements.js | 36 ++++-- tests/content/webhooks.js | 13 +- tests/linting/lint-files.js | 2 +- tests/rendering/header.js | 8 +- tests/unit/liquid.js | 2 +- tests/unit/openapi-schema.js | 2 +- tests/unit/page.js | 2 +- tests/unit/toc-links.js | 5 +- tests/unit/versions.js | 2 +- 50 files changed, 284 insertions(+), 237 deletions(-) diff --git a/components/DefaultLayout.tsx b/components/DefaultLayout.tsx index 659ad94a2f..e2d0c9d398 100644 --- a/components/DefaultLayout.tsx +++ b/components/DefaultLayout.tsx @@ -18,7 +18,8 @@ export const DefaultLayout = (props: Props) => { {error === '404' ? ( {t('oops')} - ) : (!isHomepageVersion && page.fullTitle) || (currentPathWithoutLanguage.includes('enterprise-server') && page.fullTitle) ? ( + ) : (!isHomepageVersion && page.fullTitle) || + (currentPathWithoutLanguage.includes('enterprise-server') && page.fullTitle) ? ( {page.fullTitle} ) : null} diff --git a/components/article/ArticlePage.tsx b/components/article/ArticlePage.tsx index 33b38a7bb9..0634436fa9 100644 --- a/components/article/ArticlePage.tsx +++ b/components/article/ArticlePage.tsx @@ -54,12 +54,7 @@ export const ArticlePage = () => { )} - {intro && ( -
- )} + {intro &&
} {permissions && (
+ fullPath: string + title: string + }> } export type FeaturedLink = { title: string diff --git a/components/landing/GuideCard.tsx b/components/landing/GuideCard.tsx index 6570ec8da1..9360fed0fc 100644 --- a/components/landing/GuideCard.tsx +++ b/components/landing/GuideCard.tsx @@ -13,7 +13,7 @@ export const GuideCard = ({ guide }: Props) => { className="Box color-shadow-medium height-full d-block hover-shadow-large no-underline color-text-primary p-5" href={guide.href} > -

+

{guide.intro}