From a5a1d43fb62b0fb2b982121b125b05076e740cba Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Tue, 19 Nov 2024 09:12:11 +0200 Subject: [PATCH] PM-324 drop Contentful dependency --- src/apps/dev-center/README.md | 13 -- .../landing-page/DevCenterLandingPage.tsx | 2 - .../ArticleCard/ArticleCard.module.scss | 91 ---------- .../ArticleCard/ArticleCard.tsx | 169 ------------------ .../ArticleCard/index.tsx | 1 - .../dev-center-articles-section/Articles.ts | 28 --- .../CardSection/CardSection.module.scss | 102 ----------- .../CardSection/CardSection.tsx | 73 -------- .../CardSection/index.tsx | 1 - .../DevCenterArticlesSection.module.scss | 26 --- .../DevCenterArticlesSection.tsx | 17 -- .../articles.config.ts | 83 --------- .../dev-center-articles-section/index.tsx | 1 - .../models/articleentry.model.ts | 10 -- .../models/blogpost.model.ts | 8 - .../models/index.ts | 3 - .../models/thrivearticle.model.ts | 10 -- 17 files changed, 638 deletions(-) delete mode 100644 src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/ArticleCard/ArticleCard.module.scss delete mode 100644 src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/ArticleCard/ArticleCard.tsx delete mode 100644 src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/ArticleCard/index.tsx delete mode 100644 src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/Articles.ts delete mode 100644 src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/CardSection/CardSection.module.scss delete mode 100644 src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/CardSection/CardSection.tsx delete mode 100644 src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/CardSection/index.tsx delete mode 100644 src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/DevCenterArticlesSection.module.scss delete mode 100644 src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/DevCenterArticlesSection.tsx delete mode 100644 src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/articles.config.ts delete mode 100644 src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/index.tsx delete mode 100644 src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/models/articleentry.model.ts delete mode 100644 src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/models/blogpost.model.ts delete mode 100644 src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/models/index.ts delete mode 100644 src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/models/thrivearticle.model.ts diff --git a/src/apps/dev-center/README.md b/src/apps/dev-center/README.md index adde14a01..ee5fd3480 100644 --- a/src/apps/dev-center/README.md +++ b/src/apps/dev-center/README.md @@ -1,16 +1,3 @@ -# Dev Center Configuration - -The app requires two environment variables, which contain the space id and the key used to access contentful and retrieve Thrive Articles. - -You should create a file named `.env` in the root folder, and write inside the following lines: - -```sh -REACT_APP_CONTENTFUL_EDU_SPACE_ID= -REACT_APP_CONTENTFUL_EDU_CDN_API_KEY= -``` - -We should use the same space ID and API Key as Topcoder Thrive, these are for fetching Thrive articles and videos in the landing page. - ## Landing page We can configure up to 5 articles shown on the landing page. The articles can be from Topcoder Thrive and/or Topcoder Blog. diff --git a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/DevCenterLandingPage.tsx b/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/DevCenterLandingPage.tsx index 26b0de173..899452ef3 100644 --- a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/DevCenterLandingPage.tsx +++ b/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/DevCenterLandingPage.tsx @@ -1,6 +1,5 @@ import { FC } from 'react' -import { DevCenterArticlesection } from './dev-center-articles-section' import { DevCenterGetStarted } from './dev-center-get-started' import { DevCenterHeader } from './dev-center-header' import styles from './DevCenterLandingPage.module.scss' @@ -9,7 +8,6 @@ const DevCenter: FC = () => (
-
) diff --git a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/ArticleCard/ArticleCard.module.scss b/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/ArticleCard/ArticleCard.module.scss deleted file mode 100644 index 700e92492..000000000 --- a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/ArticleCard/ArticleCard.module.scss +++ /dev/null @@ -1,91 +0,0 @@ -@import "@libs/ui/styles/includes"; - -.outerContainer{ - border-radius: 8px; - position: relative; - background-size: 100% 100%; - overflow: hidden; - - @include ltemd{ - background-size: cover; - } - - .innerContainer { - width: 100%; - height: 100%; - background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30.21%, #000000 100%); - - .playButton { - width: 38px; - height: 38px; - color: $tc-white; - position: absolute; - left: calc(50% - 19px); - top: calc(50% - 19px); - } - - .container { - padding-left: $sp-6; - padding-right: $sp-6; - padding-bottom: $sp-6; - position: absolute; - bottom: 0px; - width: 100%; - - .topLine { - display: flex; - flex-direction: row; - justify-content: space-between; - margin-bottom: 14px; - align-items: center; - } - - .author { - opacity: 0.72; - text-transform: capitalize; - display: block; - margin-bottom: $sp-4; - } - - .summary { - @include font-weight-normal; - display: block; - white-space: nowrap; - overflow: hidden; - margin-bottom: $sp-4; - text-overflow: ellipsis; - } - - .readMore { - font-weight: 700; - font-size: 16px; - line-height: 16px; - text-transform: uppercase; - } - - - } - - - } -} - -.mainArticle { - - @include ltemd{ - aspect-ratio: 4 / 3; - } -} - -.smallArticle { - aspect-ratio: 4 /3; - - @include ltemd{ - width: 100%; - max-height: 240px; - } -} - -.mainArticle:hover, .smallArticle:hover{ - cursor: pointer; -} diff --git a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/ArticleCard/ArticleCard.tsx b/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/ArticleCard/ArticleCard.tsx deleted file mode 100644 index ba38a80ba..000000000 --- a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/ArticleCard/ArticleCard.tsx +++ /dev/null @@ -1,169 +0,0 @@ -import { FC } from 'react' -import classNames from 'classnames' - -import { THRIVE_PAGE } from '~/apps/dev-center/src/config' -import { IconSolid } from '~/libs/ui' - -import { DevCenterTag } from '../../dev-center-tag' -import { isThriveArticle } from '../Articles' -import { BlogPost, ThriveArticle } from '../models' - -import styles from './ArticleCard.module.scss' - -interface ArticleDetails { - author: string - image: string - isThrive: boolean - isVideo: boolean - summary: string - tagText: string - url: string -} - -function openArticle(url: string): void { - window.open( - url, - '_blank', // This is what makes it open in a new window. - ) -} - -function getTagText(isThrive: boolean, isVideo: boolean): string { - return isThrive - ? isVideo - ? 'Thrive Video' - : 'Thrive Article' - : 'Success Story' -} - -function getArticleContent( - article: ThriveArticle | BlogPost, - isThrive: boolean, -): string { - return isThrive ? (article as ThriveArticle).content : (article as BlogPost).contentSnippet -} - -function getArticleDetails(article: ThriveArticle | BlogPost): ArticleDetails { - const isThrive: boolean = isThriveArticle(article) - const thriveArticle: ThriveArticle = article as ThriveArticle - const blogPost: BlogPost = article as BlogPost - const isVideo: boolean = isThrive && thriveArticle.type === 'Video' - - const tagText: string = getTagText(isThrive, isVideo) - - const content: string = getArticleContent(article, isThrive) - const regex: RegExp = /(<([^>]+)>)/gi - const summary: string = content.replace(regex, '') // Remove html from the content string - const url: string = isThrive - ? `${THRIVE_PAGE}/articles/${thriveArticle.slug}` - : blogPost.link - const author: string = !isThrive ? blogPost.creator : '' - const image: string = isThrive - ? thriveArticle.featuredImage.fields.file.url - : blogPost.featuredImage - - return { - author, - image, - isThrive, - isVideo, - summary, - tagText, - url, - } -} - -function getOuterClass(isMain: boolean, className: string): string { - return classNames( - className, - styles.outerContainer, - isMain ? styles.mainArticle : styles.smallArticle, - ) -} - -interface ArticleCardProps { - article: ThriveArticle | BlogPost - className?: string - isMain: boolean -} - -const ArticleCard: FC = props => { - const outerClass: string = getOuterClass(props.isMain, props.className ?? '') - const { - isThrive, - isVideo, - tagText, - summary, - url, - author, - image, - }: ArticleDetails = getArticleDetails(props.article) - - return ( -
-
- {isThrive && isVideo && ( - - )} -
-
- - {isThrive && ( - - {(props.article as ThriveArticle).readTime} - - )} -
- {props.isMain ? ( -

- {props.article.title} -

- ) : ( -

- {props.article.title} -

- )} - {!isThrive && ( - - {author} - - )} - {props.isMain && ( - <> - - {summary} - - - READ MORE - - - )} -
-
-
- ) -} - -export default ArticleCard diff --git a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/ArticleCard/index.tsx b/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/ArticleCard/index.tsx deleted file mode 100644 index faf7c7bbc..000000000 --- a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/ArticleCard/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export { default as ArticleCard } from './ArticleCard' diff --git a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/Articles.ts b/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/Articles.ts deleted file mode 100644 index af43cfba4..000000000 --- a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/Articles.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { API_BASE, WP_CONTENT } from '~/apps/dev-center/src/config' - -import { BlogPost, ThriveArticle } from './models' - -/** Check if the article is a BlogPost or a ThriveArticle */ -export function isThriveArticle(article: BlogPost | ThriveArticle): article is ThriveArticle { - return (article as ThriveArticle).readTime !== undefined -} - -/** This is the default image to be used for blog posts that do not provide an url to the hero image */ -const DEFAULT_BLOG_IMAGE: string = `${WP_CONTENT}/uploads/2017/04/SRM_Blog.png` - -/** Get the blog with the given url, or return undefined if the blog couldn't be fetched */ -export async function getBlog(url: string): Promise { - try { - const response: Response = await fetch(`${API_BASE}/blog?limit=200`) - const data: Array = await response.json() - const blog: BlogPost = data.filter(x => x.link === url)[0] - // If the returned data do not contain the URL to the image, use the default one - if (!blog.featuredImage) { - blog.featuredImage = DEFAULT_BLOG_IMAGE - } - - return blog - } catch (e) { - return undefined - } -} diff --git a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/CardSection/CardSection.module.scss b/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/CardSection/CardSection.module.scss deleted file mode 100644 index d869817f4..000000000 --- a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/CardSection/CardSection.module.scss +++ /dev/null @@ -1,102 +0,0 @@ -@import "@libs/ui/styles/includes"; - -.container { - width: 100%; - justify-content: center; - - .innerContainer { - display: grid; - grid-template-columns: 2fr 1fr 1fr; - grid-template-rows: 1fr 1fr; - gap: 32px; - - @include xl{ - grid-template-columns: 1fr 1fr; - grid-template-rows: 2fr 1fr 1fr; - max-width: 812px; - margin: auto; - } - - @include lg{ - grid-template-columns: 1fr 1fr; - grid-template-rows: 2fr 1fr 1fr; - } - - @include ltemd{ - display: flex; - flex-direction: column; - max-width: 400px; - margin: auto; - } - - .mainItem { - grid-row: 1 / span 2; - grid-column: 1; - - @include xl{ - grid-row: 1 ; - grid-column: 1 / span 2; - } - - @include lg{ - grid-row: 1 ; - grid-column: 1 / span 2; - } - } - .item2 { - grid-row: 1; - grid-column: 2; - - @include xl{ - grid-row: 2; - grid-column: 1; - } - @include lg{ - grid-row: 2; - grid-column: 1; - } - } - .item3 { - grid-row: 1; - grid-column: 3; - - @include xl{ - grid-row: 2; - grid-column: 2; - } - @include lg{ - grid-row: 2; - grid-column: 2; - } - } - - .item4 { - grid-row: 2; - grid-column: 2; - - @include xl{ - grid-row: 3; - grid-column: 1; - } - @include lg{ - grid-row: 3; - grid-column: 1; - } - } - .item5 { - grid-row: 2; - grid-column: 3; - - @include xl{ - grid-row: 3; - grid-column: 2; - } - @include lg{ - grid-row: 3; - grid-column: 2; - } - } - } -} - - diff --git a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/CardSection/CardSection.tsx b/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/CardSection/CardSection.tsx deleted file mode 100644 index 3617b1f0f..000000000 --- a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/CardSection/CardSection.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import { ContentfulClientApi, createClient } from 'contentful' -import { FC, useEffect, useState } from 'react' - -import { ArticleCard } from '../ArticleCard' -import { getBlog } from '../Articles' -import { ArticlesUrl, defaultBlogs } from '../articles.config' -import { ArticleType, BlogPost, ThriveArticle } from '../models' - -import styles from './CardSection.module.scss' - -const CardSection: FC = () => { - const [articles, setArticles]: [ - Array, - React.Dispatch>> - ] = useState>([]) - - useEffect(() => { - const client: ContentfulClientApi = createClient({ - accessToken: ( - process.env.REACT_APP_CONTENTFUL_EDU_CDN_API_KEY - ?? 'EXl1Y8-6VFyHBqJqlxGp2LKmyNJJPutDbKH977G07eg' - ), - space: ( - process.env.REACT_APP_CONTENTFUL_EDU_SPACE_ID - ?? 'piwi0eufbb2g' - ), - }) - Promise.all( - ArticlesUrl.map(async (articleUrl, idx): Promise => { - switch (articleUrl.type) { - case ArticleType.Thrive: - return (await client.getEntry(articleUrl.url)).fields as ThriveArticle - - case ArticleType.Blog: { - const blog: BlogPost - = (await getBlog(articleUrl.url)) - ?? defaultBlogs[idx] - return blog - } - - default: { - return undefined - } - } - }), - ) - .then(arr => setArticles(arr.filter(Boolean) as Array)) - }, []) - - const articleStyles: Array = [ - styles.mainItem, - styles.item2, - styles.item3, - styles.item4, - styles.item5, - ] - - return ( -
-
- {articles.map((article, index) => ( - - ))} -
-
- ) -} - -export default CardSection diff --git a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/CardSection/index.tsx b/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/CardSection/index.tsx deleted file mode 100644 index 5f4ddacdc..000000000 --- a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/CardSection/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export { default as CardSection } from './CardSection' diff --git a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/DevCenterArticlesSection.module.scss b/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/DevCenterArticlesSection.module.scss deleted file mode 100644 index 8405de69b..000000000 --- a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/DevCenterArticlesSection.module.scss +++ /dev/null @@ -1,26 +0,0 @@ -@import "@libs/ui/styles/includes"; - -.container { - background-color: $black-5; - width: 100%; - height: fit-content; - padding: 80px 0px; - margin-top: 64px; - - @include ltemd { - padding: 40px 0px; - } - - .title { - @include font-black-100; - font-weight: 500; - font-size: 44px; - line-height: 44px; - margin-bottom: $sp-8; - - @include ltemd { - font-size: 27px; - line-height: 28px; - } - } -} diff --git a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/DevCenterArticlesSection.tsx b/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/DevCenterArticlesSection.tsx deleted file mode 100644 index 2987ef6d9..000000000 --- a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/DevCenterArticlesSection.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { FC } from 'react' - -import { ContentLayout } from '~/libs/ui' - -import { CardSection } from './CardSection' -import styles from './DevCenterArticlesSection.module.scss' - -const DevCenterArticlesection: FC = () => ( -
- -

Success Stories And Articles

- -
-
-) - -export default DevCenterArticlesection diff --git a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/articles.config.ts b/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/articles.config.ts deleted file mode 100644 index bc56e7c9f..000000000 --- a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/articles.config.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* eslint-disable max-len */ -import { BLOG_PAGE, WP_CONTENT } from '~/apps/dev-center/src/config' - -import { ArticleEntry, ArticleType, BlogPost } from './models' - -/** - * This array defiens which thirive articles and blog pasts should be shown. - * The first element in the array will be the main article. - * For Thrive Articles, the url should be the Contentful ID. - * For Blog Posts, the url is the url linking to the post on topcoder.com - * Example - * { - * type: ArticleType.Blog, - * url: `${BLOG_PAGE}/talent-as-a-service-taas-a-brilliant-solution-to-the-talent-gap/`, - * } - * { - * type: ArticleType.Thrive, - * url: '6KP9iCELCsLWTSWirplWs2', - * } - */ -export const ArticlesUrl: Array = [ - { - type: ArticleType.Thrive, - url: '6KP9iCELCsLWTSWirplWs2', - }, - { - type: ArticleType.Thrive, - url: '1afUuuZVt1JI14iRkAIqba', - }, - { - type: ArticleType.Thrive, - url: 'puRqAymWv7hjjyHyunGK2', - }, - { - type: ArticleType.Thrive, - url: '6yZJ8xSYTEqVJhMeQyA7BA', - }, - { - type: ArticleType.Thrive, - url: '3QOvaHaSxjF26owDurtfKZ', - }, -] - -/** - * This array contains the default blog posts to be shown if the ones specified above are not available. - */ -export const defaultBlogs: Array = [ - { - contentSnippet: 'In light of the incredible speed of innovation, specialized tech talent has never been more critical to business success. Yet access to that talent remains frustratingly difficult for many companies. According to the Society for Human Resources Management, 83% of businesses are having trouble recruiting suitable candidates for their open positions, particularly when it comes […]\nThe post Talent as a Service (TaaS): A Brilliant Solution to the Talent Gap appeared first on Topcoder.', - creator: 'Kiran Hampapura', - featuredImage: `${WP_CONTENT}/uploads/2019/11/taashero.jpg`, - link: `${BLOG_PAGE}/talent-as-a-service-taas-a-brilliant-solution-to-the-talent-gap/`, - title: 'Talent as a Service (TaaS): A Brilliant Solution to the Talent Gap', - }, - { - contentSnippet: 'Can our Topcoder accounts be hacked? Can our well-earned cash be stolen away through the platform? Can customers suffer from intellectual theft? These sensitive questions belong to a discussion on a beyond-interesting topic: security. Honoring Topcoder’s security themed month, we want to raise awareness on what cyber security means for members and customers. We turned […]\nThe post Securing A Safe Work System For Members And Customers With John Wheeler - The Topcoder Nation Show #18 appeared first on Topcoder.', - creator: 'mahestro', - featuredImage: `${WP_CONTENT}/uploads/2022/07/00-tcn-show-18-john-wheeler.png`, - link: `${BLOG_PAGE}/securing-a-safe-work-system-for-members-and-customers-with-john-wheeler-the-topcoder-nation-show-18/`, - title: 'Securing A Safe Work System For Members And Customers With John Wheeler – The Topcoder Nation Show #18', - }, - { - contentSnippet: 'Job opportunities, upskilling, and mentoring are traits that identify the endeavor that this young gentleman is leading in Africa. Meet Abiodun (), born and raised in Lagos; he aims to close the gap between the tech talent in his region and opportunities, leveraging Topcoder as a medium to make it happen. Abiodun loves live music […]\nThe post Building A Tech Community In Africa With Code_Abbey – The Topcoder Nation Show #17 appeared first on Topcoder.', - creator: 'mahestro', - featuredImage: `${WP_CONTENT}/uploads/2022/06/00-tcn-show-17-code_abby-and-gigs-in-africa.png`, - link: `${BLOG_PAGE}/building-a-tech-community-in-africa-with-code_abbey-the-topcoder-nation-show-17/`, - title: 'Building A Tech Community In Africa With Code_Abbey – The Topcoder Nation Show #17', - }, - { - contentSnippet: 'CellPhoneService We just need to do the calculations described in the statement. One part of the calculations that may be tricky for beginners is the fee per each started minute of a call. If we have a call that takes S seconds, the number of minutes we’ll paying for can be computed by dividing S […]\nThe post Single Round Match 833 Editorials appeared first on Topcoder.', - creator: 'misof', - featuredImage: `${WP_CONTENT}/uploads/2017/04/SRM_Blog.png`, - link: `${BLOG_PAGE}/single-round-match-833-editorials/`, - title: 'Single Round Match 833 Editorials', - }, - { - contentSnippet: 'TwoDimensionalSort Imagine that we label rows of the board A to Z from top to bottom. If we got each rook X into its row X, the board would surely be sorted. With N rooks we can always achieve that in at most 2*N moves. In the first N moves we’ll move some rooks horizontally […]\nThe post TCO22 Round 3 Editorial appeared first on Topcoder.', - creator: 'misof', - featuredImage: `${WP_CONTENT}/uploads/2017/04/SRM_Blog.png`, - link: `${BLOG_PAGE}/tco22-round-3-editorial/`, - title: 'TCO22 Round 3 Editorial', - }, -] diff --git a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/index.tsx b/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/index.tsx deleted file mode 100644 index 664c74822..000000000 --- a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export { default as DevCenterArticlesection } from './DevCenterArticlesSection' diff --git a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/models/articleentry.model.ts b/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/models/articleentry.model.ts deleted file mode 100644 index bf5466632..000000000 --- a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/models/articleentry.model.ts +++ /dev/null @@ -1,10 +0,0 @@ -export enum ArticleType { - Blog = 'blog', - Thrive = 'thrive', -} - -/** The type of the objects used to specy which articles should be shown inside articles.config.ts */ -export interface ArticleEntry { - type: ArticleType, - url: string, -} diff --git a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/models/blogpost.model.ts b/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/models/blogpost.model.ts deleted file mode 100644 index 69d249f4a..000000000 --- a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/models/blogpost.model.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** The type of the blog post retrieved from the api */ -export interface BlogPost { - contentSnippet: string - creator: string - featuredImage: string - link: string - title: string -} diff --git a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/models/index.ts b/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/models/index.ts deleted file mode 100644 index e612c6a52..000000000 --- a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/models/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './articleentry.model' -export * from './blogpost.model' -export * from './thrivearticle.model' diff --git a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/models/thrivearticle.model.ts b/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/models/thrivearticle.model.ts deleted file mode 100644 index 47e84b5d4..000000000 --- a/src/apps/dev-center/src/dev-center-pages/community-app/landing-page/dev-center-articles-section/models/thrivearticle.model.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** The type of the Thrive Articles retrieved from Contentful */ -export interface ThriveArticle { - content: string - contentAuthor: Array<{ fields: { name: string; }; }> - featuredImage: { fields: { file: { url: string; }; title: string; }; } - readTime: string - slug: string - title: string - type?: string -}