Skip to content

Commit

Permalink
fix: update links to point to cloud.layer5.io
Browse files Browse the repository at this point in the history
Signed-off-by: Amit Amrutiya <[email protected]>
  • Loading branch information
amitamrutiya committed Nov 13, 2024
1 parent fea308e commit 2c8c92a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/custom/CatalogDetail/ChallengesSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -29,7 +29,7 @@ const ChallengesSection: React.FC<ChallengesSectionProps> = ({ filteredAcademyDa

const renderChallengeItem = (item: string, index: number) => (
<Link
href={`https://meshery.layer5.io/academy/challenges/${slugify('' + item)}`}
href={`${CLOUD_URL}/academy/challenges/${slugify('' + item)}`}
target="_blank"
rel="noopener noreferrer"
style={{ textDecoration: 'none', color: 'inherit' }}
Expand Down
4 changes: 2 additions & 2 deletions src/custom/CatalogDetail/LearningSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Link, ListItemIcon } from '../../base';
import { LearningIcon } 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';

Expand All @@ -29,7 +29,7 @@ const LearningSection: React.FC<LearningSectionProps> = ({ filteredAcademyData }

const renderLearningItem = (item: string, index: number) => (
<Link
href={`https://meshery.layer5.io/academy/learning-paths/${slugify('' + item)}`}
href={`${CLOUD_URL}/academy/learning-paths/${slugify('' + item)}`}
target="_blank"
rel="noopener noreferrer"
style={{ textDecoration: 'none', color: 'inherit' }}
Expand Down
4 changes: 2 additions & 2 deletions src/custom/CatalogDetail/UserInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Avatar } from '../../base';
import { Pattern } from '../CustomCatalog/CustomCard';
import { getVersion } from '../CustomCatalog/Helper';
import { formatDate } from './helper';
import { CLOUD_URL, formatDate } from './helper';
import { ContentDetailsPoints, ContentDetailsText, ContentRow, RedirectLink } from './style';
import { UserProfile } from './types';

Expand Down Expand Up @@ -32,7 +32,7 @@ const UserInfo: React.FC<UserInfoProps> = ({ details, showVersion = true, userPr
}}
/>
<RedirectLink
href={`https://meshery.layer5.io/user/${details?.user_id}`}
href={`${CLOUD_URL}/user/${details?.user_id}`}
target="_blank"
rel="noopener noreferrer"
>
Expand Down
2 changes: 2 additions & 0 deletions src/custom/CatalogDetail/helper.ts
Original file line number Diff line number Diff line change
@@ -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))
Expand Down

0 comments on commit 2c8c92a

Please sign in to comment.