From bebd4470fa2d33f6d2a2e89fb8b7b578592d69dd Mon Sep 17 00:00:00 2001 From: Hemant Date: Sun, 25 Aug 2024 13:18:45 +0530 Subject: [PATCH] chore: removed tnc --- src/components/TVL.tsx | 38 +++++++++++++++++++++++++------------ src/components/TxButton.tsx | 25 ++++++++++++------------ 2 files changed, 38 insertions(+), 25 deletions(-) diff --git a/src/components/TVL.tsx b/src/components/TVL.tsx index 840ff561..20a88d46 100755 --- a/src/components/TVL.tsx +++ b/src/components/TVL.tsx @@ -16,6 +16,7 @@ import { import { useAtomValue } from 'jotai'; import Link from 'next/link'; import React from 'react'; +import toast from 'react-hot-toast'; const TVL: React.FC = () => { const _strategies = useAtomValue(strategiesAtom); @@ -71,6 +72,7 @@ const TVL: React.FC = () => { Your referral link{' '} + {/* TODO: update the url */} (?) @@ -79,21 +81,33 @@ const TVL: React.FC = () => { justifyContent="space-between" alignItems="center" > - - {referralCode} - + {!referralCode ? ( + + ) : ( + + {referralCode} + + )} - navigator.clipboard.writeText( - `${window.location.origin}/r/${referralCode}`, - ) - } + onClick={() => { + if (window.location.origin.includes('app.strkfarm.xyz')) { + navigator.clipboard.writeText( + `https://strkfarm.xyz/r/${referralCode}`, + ); + } else { + navigator.clipboard.writeText( + `${window.location.origin}/r/${referralCode}`, + ); + } + + toast.success('Referral link copied to clipboard'); + }} /> diff --git a/src/components/TxButton.tsx b/src/components/TxButton.tsx index e05f1df1..0f031358 100755 --- a/src/components/TxButton.tsx +++ b/src/components/TxButton.tsx @@ -23,7 +23,6 @@ import { useEffect, useMemo, useState } from 'react'; import { isMobile } from 'react-device-detect'; import { TwitterShareButton } from 'react-share'; import { Call } from 'starknet'; -import TncModal from './TncModal'; interface TxButtonProps { txInfo: StrategyTxProps; @@ -211,12 +210,12 @@ export default function TxButton(props: TxButtonProps) { - {showTncModal && ( + {/* {showTncModal && ( setShowTncModal(false)} /> - )} + )} */}