Skip to content

Commit 756c924

Browse files
chore: add origins link (#1070)
* chore: add origins link * Create lemon-bikes-run.md
1 parent 5d389b6 commit 756c924

File tree

5 files changed

+26
-0
lines changed

5 files changed

+26
-0
lines changed

.changeset/lemon-bikes-run.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"frontend": patch
3+
---
4+
5+
chore: add origins link

apps/frontend/src/app/3_organisms/Header/Header.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { useWalletConnect, useWrongNetworkCheck } from '../../../hooks';
1818
import { useCurrentChain } from '../../../hooks/useChainStore';
1919
import { translations } from '../../../locales/i18n';
2020
import { isBobChain } from '../../../utils/chain';
21+
import { getOriginsUrl } from '../../../utils/helpers';
2122
import { menuItemsMapping } from './Header.constants';
2223
import { BridgeMenuItem } from './components/BridgeMenuItem/BridgeMenuItem';
2324
import { NavItem } from './components/NavItem/NavItem';
@@ -68,6 +69,16 @@ export const Header: FC = () => {
6869
<NavItem item={item} onClick={toggle} />
6970
</li>
7071
))}
72+
<li>
73+
<a
74+
href={getOriginsUrl()}
75+
target="_blank"
76+
rel="noopener noreferrer"
77+
className="text-gray-10 font-normal text-sm text-opacity-75 hover:text-gray-10 no-underline px-2 py-3"
78+
>
79+
{t(translations.header.nav.origins)}
80+
</a>
81+
</li>
7182
<ProductLinks />
7283
{isBobChain(chainId) && (
7384
<>

apps/frontend/src/constants/infrastructure.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,8 @@ export const SOVRYN_INDEXER = {
4040
[Environments.Mainnet]: 'https://indexer.sovryn.app',
4141
[Environments.Testnet]: 'https://indexer.test.sovryn.app',
4242
};
43+
44+
export const ORIGINS_URL = {
45+
[Environments.Mainnet]: 'https://origins.sovryn.app',
46+
[Environments.Testnet]: 'https://develop--crowdforge.netlify.app',
47+
};

apps/frontend/src/locales/en/translations.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
"convert": "Convert",
112112
"stake": "Stake",
113113
"bitocracy": "Bitocracy",
114+
"origins": "Origins",
114115
"bob": "Go BoB",
115116
"runes": "Runes",
116117
"spicePoints": "Spice Points",

apps/frontend/src/utils/helpers.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
AMM_SERVICE,
1818
GRAPH_WRAPPER,
1919
INDEXER_SERVICE,
20+
ORIGINS_URL,
2021
SERVICES_CONFIG,
2122
} from '../constants/infrastructure';
2223
import { BOB } from '../constants/infrastructure/bob';
@@ -88,6 +89,9 @@ export const getIndexerUrl = () =>
8889
export const getAmmServiceUrl = () =>
8990
AMM_SERVICE[isMainnet() ? Environments.Mainnet : Environments.Testnet];
9091

92+
export const getOriginsUrl = () =>
93+
ORIGINS_URL[isMainnet() ? Environments.Mainnet : Environments.Testnet];
94+
9195
export const dateFormat = (timestamp: number) => {
9296
const stamp = dayjs.tz(Number(timestamp) * MS, 'UTC');
9397
return stamp.format(`YYYY-MM-DD HH:mm:ss +UTC`);

0 commit comments

Comments
 (0)