-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix_bug_report
- Loading branch information
Showing
8 changed files
with
98 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
'use client'; | ||
|
||
import Link from 'next/link'; | ||
import { BASE_URL, SOCIALS, URL } from '@/lib/constants'; | ||
import { Social } from '@session/ui/components/SocialLinkList'; | ||
import { ReactNode } from 'react'; | ||
import { useTranslations } from 'next-intl'; | ||
import { useAddSessionTokenToWallet } from '@session/wallet/hooks/wallet-hooks'; | ||
|
||
export function NewTokenContractInfo() { | ||
const dictionary = useTranslations('banner'); | ||
const { addToken } = useAddSessionTokenToWallet(`${BASE_URL}/images/token_logo.svg`); | ||
return ( | ||
<span> | ||
{dictionary.rich('newTokenContract', { | ||
'remove-token-link': (children: ReactNode) => ( | ||
<Link | ||
className="font-medium underline" | ||
href={URL.REMOVE_TOKEN_FROM_WATCH_LIST} | ||
referrerPolicy="no-referrer" | ||
target="_blank" | ||
> | ||
{children} | ||
</Link> | ||
), | ||
'watch-token': (children: ReactNode) => ( | ||
<a | ||
className="cursor-pointer font-medium underline" | ||
onClick={addToken} | ||
referrerPolicy="no-referrer" | ||
target="_blank" | ||
> | ||
{children} | ||
</a> | ||
), | ||
link: (children: ReactNode) => ( | ||
<Link | ||
className="font-medium underline" | ||
href={SOCIALS[Social.Discord].link} | ||
referrerPolicy="no-referrer" | ||
target="_blank" | ||
> | ||
{children} | ||
</Link> | ||
), | ||
})} | ||
</span> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters