From 49a246e929b33d5b648e18ac7ba7f037c9e27fd3 Mon Sep 17 00:00:00 2001 From: keyan Date: Wed, 17 Nov 2021 16:54:00 -0600 Subject: [PATCH] different icon for tipping --- components/upvote.js | 20 ++++++++++++-------- svgs/lightning-plus.svg | 3 +++ 2 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 svgs/lightning-plus.svg diff --git a/components/upvote.js b/components/upvote.js index e387cddd..e6d5d8a1 100644 --- a/components/upvote.js +++ b/components/upvote.js @@ -1,5 +1,6 @@ import { LightningConsumer } from './lightning' import UpArrow from '../svgs/lightning-arrow.svg' +import BoltAdd from '../svgs/lightning-plus.svg' import styles from './upvote.module.css' import { gql, useMutation } from '@apollo/client' import { signIn } from 'next-auth/client' @@ -84,6 +85,7 @@ export default function UpVote ({ item, className }) { } const noSelfTips = item?.meVote && item?.user?.id === me?.id + const Arrow = item?.meVote ? BoltAdd : UpArrow return ( @@ -148,19 +150,21 @@ export default function UpVote ({ item, className }) { } > - + { - e.stopPropagation() - }} - /> + onClick={e => { + e.stopPropagation() + }} + /> + } diff --git a/svgs/lightning-plus.svg b/svgs/lightning-plus.svg new file mode 100644 index 00000000..fb736004 --- /dev/null +++ b/svgs/lightning-plus.svg @@ -0,0 +1,3 @@ + + +