Skip to content

Commit

Permalink
feat: 621 - change docs link for jsfe-en (#622)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristiBo authored Oct 26, 2024
1 parent 1d7b8aa commit 9fbb7bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions dev-data/communication.data.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const RS_DOCS_COMMUNICATION_LINK = 'https://docs.rs.school/#/rs-school-chats';
export const RS_DOCS_EN_LINK = 'https://docs.rs.school/#/en/';
export const RS_DOCS_TELEGRAM_CHATS_LINK = 'https://docs.rs.school/#/rs-school-chats?id=telegram';
export const JS_EN_TELEGRAM_CHAT_LINK = 'https://t.me/RSS_EN';

Expand Down
1 change: 1 addition & 0 deletions dev-data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export {
DISCORD_LINKS,
JS_EN_TELEGRAM_CHAT_LINK,
RS_DOCS_COMMUNICATION_LINK,
RS_DOCS_EN_LINK,
RS_DOCS_TELEGRAM_CHATS_LINK,
} from './communication.data';
export { angular } from './angular.data';
Expand Down
4 changes: 3 additions & 1 deletion src/widgets/communication/ui/communication.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
DISCORD_LINKS,
JS_EN_TELEGRAM_CHAT_LINK,
RS_DOCS_COMMUNICATION_LINK,
RS_DOCS_EN_LINK,
RS_DOCS_TELEGRAM_CHATS_LINK,
communicationText,
} from 'data';
Expand Down Expand Up @@ -49,6 +50,7 @@ export const Communication = ({ courseName, lang = 'en' }: CommunicationProps) =
const courseDiscordLink = isJsEnCourse ? discordLinkJs : discordLink;
const discordFirstHalfText = !isJsEnCourse ? firstParagraphFirstHalf : null;
const discordSecondHalfText = isJsEnCourse ? discordParagraphTextJs : firstParagraphSecondHalf;
const rsDocsHref = isJsEnCourse ? RS_DOCS_EN_LINK : RS_DOCS_COMMUNICATION_LINK;

return (
<section className={cx('container')}>
Expand Down Expand Up @@ -90,7 +92,7 @@ export const Communication = ({ courseName, lang = 'en' }: CommunicationProps) =
</Paragraph>
<Paragraph>
{thirdParagraphFirstHalf}
<LinkCustom href={RS_DOCS_COMMUNICATION_LINK} external>
<LinkCustom href={rsDocsHref} external>
{rsDocsLink}
</LinkCustom>
{thirdParagraphSecondHalf}
Expand Down

0 comments on commit 9fbb7bb

Please sign in to comment.