From 941171725324caa4f07c44d4144d71cda5b60488 Mon Sep 17 00:00:00 2001 From: PawelKrawczyk96 Date: Fri, 5 May 2023 13:41:43 +0200 Subject: [PATCH 1/3] add twitter banner --- .../HeaderWrapper/HeaderWrapper.tsx | 67 +++++++++++++------ src/containers/HeaderWrapper/style.ts | 33 +++++++++ src/static/svg/twitterHeader.svg | 3 + 3 files changed, 81 insertions(+), 22 deletions(-) create mode 100644 src/containers/HeaderWrapper/style.ts create mode 100644 src/static/svg/twitterHeader.svg diff --git a/src/containers/HeaderWrapper/HeaderWrapper.tsx b/src/containers/HeaderWrapper/HeaderWrapper.tsx index b6eef8ac..dd2e5579 100644 --- a/src/containers/HeaderWrapper/HeaderWrapper.tsx +++ b/src/containers/HeaderWrapper/HeaderWrapper.tsx @@ -8,6 +8,10 @@ import { Status, actions as walletActions } from '@reducers/solanaWallet' import { WalletType } from '@web3/wallet' import { network } from '@selectors/solanaConnection' import { DEFAULT_PUBLICKEY } from '@consts/static' +import twitterIcon from '@static/svg/twitterHeader.svg' +import { typography } from '@static/theme' +import useStyles from './style' +import { Typography } from '@material-ui/core' export const HeaderWrapper: React.FC = () => { const dispatch = useDispatch() @@ -16,6 +20,7 @@ export const HeaderWrapper: React.FC = () => { const currentNetwork = useSelector(network) const location = useLocation() const [typeOfWallet, setTypeOfWallet] = useState(WalletType.PHANTOM) + const classes = useStyles() useEffect(() => { let enumWallet = WalletType.PHANTOM @@ -68,28 +73,46 @@ export const HeaderWrapper: React.FC = () => { }, []) return ( -
{ - dispatch(actions.setNetwork(chosen)) - }} - onWalletSelect={chosen => { - if (walletAddress.equals(DEFAULT_PUBLICKEY)) { - setTypeOfWallet(chosen) - } - dispatch(walletActions.connect(chosen)) - }} - landing={location.pathname.substr(1)} - walletConnected={walletStatus === Status.Initialized} - onFaucet={() => { - dispatch(walletActions.airdrop()) - }} - onDisconnectWallet={() => { - dispatch(walletActions.disconnect()) - }} - typeOfNetwork={currentNetwork} - typeOfWallet={typeOfWallet} - /> +
+
+ + + New tweet!   + + + Check out our Twitter{' '} + + thread + {' '} + about status of application. + +
+
{ + dispatch(actions.setNetwork(chosen)) + }} + onWalletSelect={chosen => { + if (walletAddress.equals(DEFAULT_PUBLICKEY)) { + setTypeOfWallet(chosen) + } + dispatch(walletActions.connect(chosen)) + }} + landing={location.pathname.substr(1)} + walletConnected={walletStatus === Status.Initialized} + onFaucet={() => { + dispatch(walletActions.airdrop()) + }} + onDisconnectWallet={() => { + dispatch(walletActions.disconnect()) + }} + typeOfNetwork={currentNetwork} + typeOfWallet={typeOfWallet} + /> +
) } diff --git a/src/containers/HeaderWrapper/style.ts b/src/containers/HeaderWrapper/style.ts new file mode 100644 index 00000000..b7819c4c --- /dev/null +++ b/src/containers/HeaderWrapper/style.ts @@ -0,0 +1,33 @@ +import { makeStyles, createStyles, Theme } from '@material-ui/core/styles' +import { colors, typography } from '@static/theme' + +const useStyles = makeStyles((theme: Theme) => + createStyles({ + banner: { + backgroundColor: '#1DA1F2', + height: '40px', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + textAlign: 'center', + color: '#FBFBFB', + ...typography.subtitle2, + padding: '8px', + [theme.breakpoints.down('xs')]: { + flexDirection: 'column', + height: 'auto' + } + }, + textWithIcon: { + ...typography.subtitle1, + display: 'flex', + + alignItems: 'center' + }, + tweet: { + textDecoration: 'none', + color: colors.gray.dark + } + }) +) +export default useStyles diff --git a/src/static/svg/twitterHeader.svg b/src/static/svg/twitterHeader.svg new file mode 100644 index 00000000..90f8531a --- /dev/null +++ b/src/static/svg/twitterHeader.svg @@ -0,0 +1,3 @@ + + + From b073aa218d204401a0d4593ececd3bd3d5d5a628 Mon Sep 17 00:00:00 2001 From: PawelKrawczyk96 Date: Fri, 5 May 2023 13:56:47 +0200 Subject: [PATCH 2/3] remove icon --- src/containers/HeaderWrapper/HeaderWrapper.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/containers/HeaderWrapper/HeaderWrapper.tsx b/src/containers/HeaderWrapper/HeaderWrapper.tsx index dd2e5579..5de5029c 100644 --- a/src/containers/HeaderWrapper/HeaderWrapper.tsx +++ b/src/containers/HeaderWrapper/HeaderWrapper.tsx @@ -75,10 +75,6 @@ export const HeaderWrapper: React.FC = () => { return (
- - - New tweet!   - Check out our Twitter{' '} Date: Fri, 5 May 2023 14:03:44 +0200 Subject: [PATCH 3/3] remove errors --- src/containers/HeaderWrapper/HeaderWrapper.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/containers/HeaderWrapper/HeaderWrapper.tsx b/src/containers/HeaderWrapper/HeaderWrapper.tsx index 5de5029c..15df1b26 100644 --- a/src/containers/HeaderWrapper/HeaderWrapper.tsx +++ b/src/containers/HeaderWrapper/HeaderWrapper.tsx @@ -8,7 +8,6 @@ import { Status, actions as walletActions } from '@reducers/solanaWallet' import { WalletType } from '@web3/wallet' import { network } from '@selectors/solanaConnection' import { DEFAULT_PUBLICKEY } from '@consts/static' -import twitterIcon from '@static/svg/twitterHeader.svg' import { typography } from '@static/theme' import useStyles from './style' import { Typography } from '@material-ui/core'