diff --git a/components/campaigns/AnnouncementHero.tsx b/components/campaigns/AnnouncementHero.tsx index ac85509f5d5..04ffae7f2de 100644 --- a/components/campaigns/AnnouncementHero.tsx +++ b/components/campaigns/AnnouncementHero.tsx @@ -57,7 +57,7 @@ export default function AnnouncementHero({ className = '', small = false }: IAnn )}
-
+
{banners.map( (banner, index) => banner.show && ( diff --git a/components/helpers/read-yaml-file.js b/components/helpers/read-yaml-file.js deleted file mode 100644 index 8cfbe521746..00000000000 --- a/components/helpers/read-yaml-file.js +++ /dev/null @@ -1,12 +0,0 @@ -import fs from 'fs/promises'; - -export const readYamlFile = async (fileName) => { - try { - const data = await fs.readFile(`./public/${fileName}`, 'utf-8'); - const yamlString = `\`\`\`yaml\n${data}\`\`\``; - - return yamlString; - } catch (error) { - throw new Error(`Error: something went wrong while reading ${fileName} file: ${error.message}`); - } -}; diff --git a/components/navigation/BlogPostItem.tsx b/components/navigation/BlogPostItem.tsx index 13c2f6fe29d..9a2fb20076a 100644 --- a/components/navigation/BlogPostItem.tsx +++ b/components/navigation/BlogPostItem.tsx @@ -112,7 +112,11 @@ export default forwardRef(function BlogPostItem( author.name ) ) - .reduce((prev, curr) => [prev, ' & ', curr].join(''))} + .reduce((prev, curr) => ( + <> + {prev} & {curr} + + ))} diff --git a/pages/casestudies/[id].tsx b/pages/casestudies/[id].tsx index d0668740edb..d418e038629 100644 --- a/pages/casestudies/[id].tsx +++ b/pages/casestudies/[id].tsx @@ -3,6 +3,7 @@ import type { MDXRemoteSerializeResult } from 'next-mdx-remote'; import { MDXRemote } from 'next-mdx-remote'; import { serialize } from 'next-mdx-remote/serialize'; +import { readYamlFile } from '@/components/helpers/read-yaml-file'; import type { ICaseStudy } from '@/types/post'; import { HeadingTypeStyle } from '@/types/typography/Heading'; import { ParagraphTypeStyle } from '@/types/typography/Paragraph'; @@ -14,7 +15,6 @@ import Heading from '../../components/typography/Heading'; import Paragraph from '../../components/typography/Paragraph'; import CaseStudiesList from '../../config/case-studies.json'; import { generateCaseStudyContent } from '../../utils/staticHelpers'; -import { readYamlFile } from '@/components/helpers/read-yaml-file'; interface IndexProps { casestudy: ICaseStudy;