-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add banner for telegram invite (#1005)
- Loading branch information
1 parent
6636239
commit d9e5239
Showing
8 changed files
with
105 additions
and
16 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import styled from 'styled-components'; | ||
|
||
import { STRING_KEYS } from '@/constants/localization'; | ||
|
||
import { useStringGetter } from '@/hooks/useStringGetter'; | ||
import { useURLConfigs } from '@/hooks/useURLConfigs'; | ||
|
||
import { layoutMixins } from '@/styles/layoutMixins'; | ||
|
||
import { Link } from '@/components/Link'; | ||
|
||
export const TelegramInviteBanner = () => { | ||
const stringGetter = useStringGetter(); | ||
const { getInTouch } = useURLConfigs(); | ||
|
||
return getInTouch ? ( | ||
<$Banner tw="mb-1 bg-color-layer-5 p-1"> | ||
{stringGetter({ | ||
key: STRING_KEYS.TELEGRAM_INVITE_BANNER, | ||
params: { | ||
HERE_LINK: ( | ||
<Link isInline isAccent href={getInTouch}> | ||
{stringGetter({ key: STRING_KEYS.HERE })} | ||
</Link> | ||
), | ||
}, | ||
})} | ||
</$Banner> | ||
) : null; | ||
}; | ||
|
||
const $Banner = styled.div` | ||
--color-border: transparent; | ||
${layoutMixins.withOuterBorderClipped} | ||
`; |