Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

621-feat: Change js en docs link #622

Merged
merged 1 commit into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading