Skip to content

Commit

Permalink
Use ExternalLink enum for footer and sitemap (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredvu authored Aug 8, 2024
1 parent 3fee859 commit d9ddc31
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
11 changes: 6 additions & 5 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Icon } from './Icon';
import { DiscourseIcon, DiscordIcon, TwitterIcon } from '../icons';

import { STRING_KEYS } from '../constants/localization';
import { ExternalLink } from '@/enums';

const socialLinks: {
labelKey: string;
Expand All @@ -20,7 +21,7 @@ const socialLinks: {
{
labelKey: STRING_KEYS.DISCORD,
descriptionKey: STRING_KEYS.DISCORD_DESCRIPTION,
href: 'https://discord.gg/Tuze6tY',
href: ExternalLink.Discord,
icon: DiscordIcon,
isExternalLink: true,
},
Expand All @@ -34,7 +35,7 @@ const socialLinks: {
{
labelKey: STRING_KEYS.FORUMS,
descriptionKey: STRING_KEYS.FORUMS_DESCRIPTION,
href: 'https://dydx.forum/',
href: ExternalLink.Forums,
icon: DiscourseIcon,
isExternalLink: true,
},
Expand All @@ -50,19 +51,19 @@ const legalLinks: {
{
labelKey: STRING_KEYS.TERMS_OF_USE,
descriptionKey: STRING_KEYS.TERMS_OF_USE_DESCRIPTION,
href: 'https://dydx.foundation/terms',
href: ExternalLink.TermsOfUse,
isExternalLink: true,
},
{
labelKey: STRING_KEYS.PRIVACY_POLICY,
descriptionKey: STRING_KEYS.PRIVACY_POLICY_DESCRIPTION,
href: 'https://dydx.foundation/privacy',
href: ExternalLink.PrivacyPolicy,
isExternalLink: true,
},
{
labelKey: STRING_KEYS.REVOLVING_CREDIT_AGREEMENT,
descriptionKey: STRING_KEYS.REVOLVING_CREDIT_AGREEMENT_DESCRIPTION,
href: 'https://dydx.foundation/revolving-credit-agreement',
href: ExternalLink.RevolvingCreditAgreement,
isExternalLink: true,
},
];
Expand Down
11 changes: 6 additions & 5 deletions src/components/Sitemap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Icon } from './Icon';
import { DiscourseIcon, DiscordIcon, TwitterIcon } from '../icons';

import { STRING_KEYS } from '../constants/localization';
import { ExternalLink } from '@/enums';

const links: {
labelKey: string;
Expand All @@ -28,19 +29,19 @@ const links: {
{
labelKey: STRING_KEYS.TERMS_OF_USE,
descriptionKey: STRING_KEYS.TERMS_OF_USE_DESCRIPTION,
href: 'https://dydx.foundation/terms',
href: ExternalLink.TermsOfUse,
isExternalLink: true,
},
{
labelKey: STRING_KEYS.PRIVACY_POLICY,
descriptionKey: STRING_KEYS.PRIVACY_POLICY_DESCRIPTION,
href: 'https://dydx.foundation/privacy',
href: ExternalLink.PrivacyPolicy,
isExternalLink: true,
},
{
labelKey: STRING_KEYS.REVOLVING_CREDIT_AGREEMENT,
descriptionKey: STRING_KEYS.REVOLVING_CREDIT_AGREEMENT_DESCRIPTION,
href: 'https://dydx.foundation/revolving-credit-agreement',
href: ExternalLink.RevolvingCreditAgreement,
isExternalLink: true,
},
],
Expand All @@ -52,7 +53,7 @@ const links: {
{
labelKey: STRING_KEYS.DISCORD,
descriptionKey: STRING_KEYS.DISCORD_DESCRIPTION,
href: 'https://discord.gg/Tuze6tY',
href: ExternalLink.Discord,
icon: DiscordIcon,
isExternalLink: true,
},
Expand All @@ -66,7 +67,7 @@ const links: {
{
labelKey: STRING_KEYS.FORUMS,
descriptionKey: STRING_KEYS.FORUMS_DESCRIPTION,
href: 'https://dydx.forum/',
href: ExternalLink.Forums,
icon: DiscourseIcon,
isExternalLink: true,
},
Expand Down

0 comments on commit d9ddc31

Please sign in to comment.