Skip to content

Commit

Permalink
Merge pull request #460 from galacticcouncil/rococo
Browse files Browse the repository at this point in the history
Rococo => prod
  • Loading branch information
vkulinich-cl authored Jan 26, 2024
2 parents 447d832 + cfdcc52 commit 50472cc
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 8 deletions.
7 changes: 6 additions & 1 deletion src/components/Layout/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ export const Header = () => {
{isWarningVisible && (
<WarningMessage
type="depeg"
text={t("depeg.modal.desx")}
text={
<div>
<p>{t("depeg.modal.desx")}</p>
<p>{t("depeg.modal.desx.crossChain")}</p>
</div>
}
modalContent={
<div sx={{ flex: "column" }}>
<Text sx={{ mt: 24 }}>{t("depeg.modal.desx")}</Text>
Expand Down
2 changes: 2 additions & 0 deletions src/components/Layout/Header/MobileNavBar/MobileNavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const MobileNavBar = () => {

const hiddenTabItems = hiddenTabs.map((hiddenTab, index) => (
<Link
disabled={hiddenTab.key === "cross-chain"}
key={index}
to={hiddenTab.href}
search={account ? { account } : undefined}
Expand Down Expand Up @@ -68,6 +69,7 @@ export const MobileNavBar = () => {

return (
<Link
disabled={item.key === "cross-chain"}
key={index}
to={item.href}
search={account ? { account } : undefined}
Expand Down
15 changes: 10 additions & 5 deletions src/components/Layout/Header/menu/HeaderMenu.styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,22 @@ export const SList = styled.nav`
display: flex;
}
`
export const SItem = styled.span<{ isActive?: boolean }>`
export const SItem = styled.span<{ isActive?: boolean; disabled?: boolean }>`
font-size: 16px;
font-weight: 600;
line-height: 18px;
margin-right: 32px;
color: ${({ isActive }) =>
isActive ? theme.colors.white : theme.colors.neutralGray300};
color: ${({ isActive, disabled }) =>
isActive
? theme.colors.white
: disabled
? theme.colors.neutralGray500
: theme.colors.neutralGray300};
&:hover {
color: ${theme.colors.primary100};
cursor: pointer;
color: ${({ disabled }) =>
disabled ? theme.colors.neutralGray500 : theme.colors.primary100};
cursor: ${({ disabled }) => (disabled ? "not-allowed" : "pointer")};
}
`
5 changes: 4 additions & 1 deletion src/components/Layout/Header/menu/HeaderMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ export const HeaderMenu = () => {

return (
<Link
disabled={item.key === "cross-chain"}
key={i}
to={item.href}
search={account ? { account } : undefined}
>
{({ isActive }) => (
<SItem isActive={isActive}>{t(item.translationKey)}</SItem>
<SItem isActive={isActive} disabled={item.key === "cross-chain"}>
{t(item.translationKey)}
</SItem>
)}
</Link>
)
Expand Down
2 changes: 1 addition & 1 deletion src/components/WarningMessage/WarningMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const WarningMessage = (props: {
</defs>
</svg>

{props.text}
<p>{props.text}</p>
</SWarningMessageContent>

<SSecondaryItem
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/en/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -365,5 +365,6 @@
"fund.button": "Fund wallet",
"depeg.modal.title": "Important Notice",
"depeg.modal.desx": "Tether have dropped support for native USDT on Kusama - herefore USDT pools are currently not priced at $1",
"depeg.modal.desx.crossChain": "Cross chain transfers in Kusama are temporarily suspended, please do not try to send tokens",
"depeg.modal.icon": "More info"
}
5 changes: 5 additions & 0 deletions src/sections/xcm/XcmPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,22 @@ import * as Apps from "@galacticcouncil/apps"
import { createComponent } from "@lit-labs/react"
import { useAccountStore } from "state/store"
import { GcTransactionCenter } from "./TransactionCenter"
import { Navigate } from "@tanstack/react-location"

export const XcmApp = createComponent({
tagName: "gc-xcm-app",
elementClass: Apps.XcmApp,
react: React,
})
const disabled = true

export function XcmPage() {
const { account } = useAccountStore()

const ref = React.useRef<Apps.XcmApp>(null)

if (disabled) return <Navigate to="/trade" search />

return (
<GcTransactionCenter>
<Page>
Expand Down

0 comments on commit 50472cc

Please sign in to comment.