From 2c8c92aa8edac7ec7ce51c43347137ca16c5668c Mon Sep 17 00:00:00 2001 From: Amit Amrutiya Date: Wed, 13 Nov 2024 20:10:22 +0530 Subject: [PATCH 1/2] fix: update links to point to cloud.layer5.io Signed-off-by: Amit Amrutiya --- src/custom/CatalogDetail/ChallengesSection.tsx | 4 ++-- src/custom/CatalogDetail/LearningSection.tsx | 4 ++-- src/custom/CatalogDetail/UserInfo.tsx | 4 ++-- src/custom/CatalogDetail/helper.ts | 2 ++ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/custom/CatalogDetail/ChallengesSection.tsx b/src/custom/CatalogDetail/ChallengesSection.tsx index 77028a2f..67207bd6 100644 --- a/src/custom/CatalogDetail/ChallengesSection.tsx +++ b/src/custom/CatalogDetail/ChallengesSection.tsx @@ -3,7 +3,7 @@ import { Link, ListItemIcon } from '../../base'; import { ChallengesIcon } from '../../icons'; import { useTheme } from '../../theme'; import CollapsibleSection from './CollapsibleSection'; -import { slugify } from './helper'; +import { CLOUD_URL, slugify } from './helper'; import { LabelDiv } from './style'; import { FilteredAcademyData } from './types'; @@ -29,7 +29,7 @@ const ChallengesSection: React.FC = ({ filteredAcademyDa const renderChallengeItem = (item: string, index: number) => ( = ({ filteredAcademyData } const renderLearningItem = (item: string, index: number) => ( = ({ details, showVersion = true, userPr }} /> diff --git a/src/custom/CatalogDetail/helper.ts b/src/custom/CatalogDetail/helper.ts index 2d6601f7..7237f1aa 100644 --- a/src/custom/CatalogDetail/helper.ts +++ b/src/custom/CatalogDetail/helper.ts @@ -1,5 +1,7 @@ import jsyaml from 'js-yaml'; +export const CLOUD_URL = 'https://cloud.layer5.io'; + export const downloadYaml = (filteredData: string, itemName: string): void => { const yamlData = Array.isArray(filteredData) ? jsyaml.dump(filteredData.find((item) => item.name === itemName)) From 15eb7be562d053c43ea7ba93fd2e0b63cdfe1c33 Mon Sep 17 00:00:00 2001 From: Amit Amrutiya Date: Wed, 13 Nov 2024 20:15:40 +0530 Subject: [PATCH 2/2] feat: update path Signed-off-by: Amit Amrutiya --- src/constants/constants.ts | 1 + src/custom/CatalogDetail/ChallengesSection.tsx | 3 ++- src/custom/CatalogDetail/LearningSection.tsx | 3 ++- src/custom/CatalogDetail/UserInfo.tsx | 3 ++- src/custom/CatalogDetail/helper.ts | 2 -- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/constants/constants.ts b/src/constants/constants.ts index 3b23acd7..e65be201 100644 --- a/src/constants/constants.ts +++ b/src/constants/constants.ts @@ -6,3 +6,4 @@ export const KEPPEL_GREEN_FILL = '#00B39F'; export const CARIBBEAN_GREEN_FILL = '#00D3A9'; export const DEFAULT_STROKE = '#000'; export const DEFAULT_STROKE_WIDTH = '2'; +export const CLOUD_URL = 'https://cloud.layer5.io'; diff --git a/src/custom/CatalogDetail/ChallengesSection.tsx b/src/custom/CatalogDetail/ChallengesSection.tsx index 67207bd6..2cec1cd7 100644 --- a/src/custom/CatalogDetail/ChallengesSection.tsx +++ b/src/custom/CatalogDetail/ChallengesSection.tsx @@ -1,9 +1,10 @@ import { useEffect, useState } from 'react'; import { Link, ListItemIcon } from '../../base'; +import { CLOUD_URL } from '../../constants/constants'; import { ChallengesIcon } from '../../icons'; import { useTheme } from '../../theme'; import CollapsibleSection from './CollapsibleSection'; -import { CLOUD_URL, slugify } from './helper'; +import { slugify } from './helper'; import { LabelDiv } from './style'; import { FilteredAcademyData } from './types'; diff --git a/src/custom/CatalogDetail/LearningSection.tsx b/src/custom/CatalogDetail/LearningSection.tsx index af9a62a8..4af9f852 100644 --- a/src/custom/CatalogDetail/LearningSection.tsx +++ b/src/custom/CatalogDetail/LearningSection.tsx @@ -1,9 +1,10 @@ import React, { useEffect, useState } from 'react'; import { Link, ListItemIcon } from '../../base'; +import { CLOUD_URL } from '../../constants/constants'; import { LearningIcon } from '../../icons'; import { useTheme } from '../../theme'; import CollapsibleSection from './CollapsibleSection'; -import { CLOUD_URL, slugify } from './helper'; +import { slugify } from './helper'; import { LabelDiv } from './style'; import { FilteredAcademyData } from './types'; diff --git a/src/custom/CatalogDetail/UserInfo.tsx b/src/custom/CatalogDetail/UserInfo.tsx index 124d801c..8a55ffa2 100644 --- a/src/custom/CatalogDetail/UserInfo.tsx +++ b/src/custom/CatalogDetail/UserInfo.tsx @@ -1,7 +1,8 @@ import { Avatar } from '../../base'; +import { CLOUD_URL } from '../../constants/constants'; import { Pattern } from '../CustomCatalog/CustomCard'; import { getVersion } from '../CustomCatalog/Helper'; -import { CLOUD_URL, formatDate } from './helper'; +import { formatDate } from './helper'; import { ContentDetailsPoints, ContentDetailsText, ContentRow, RedirectLink } from './style'; import { UserProfile } from './types'; diff --git a/src/custom/CatalogDetail/helper.ts b/src/custom/CatalogDetail/helper.ts index 7237f1aa..2d6601f7 100644 --- a/src/custom/CatalogDetail/helper.ts +++ b/src/custom/CatalogDetail/helper.ts @@ -1,7 +1,5 @@ import jsyaml from 'js-yaml'; -export const CLOUD_URL = 'https://cloud.layer5.io'; - export const downloadYaml = (filteredData: string, itemName: string): void => { const yamlData = Array.isArray(filteredData) ? jsyaml.dump(filteredData.find((item) => item.name === itemName))