Skip to content

Commit 6945dc6

Browse files
authored
Merge pull request #561 from DapperCollectives/prod-gcp
Prod gcp -> Main
2 parents ac6760a + 36a378d commit 6945dc6

10 files changed

Lines changed: 173 additions & 153 deletions

File tree

frontend/packages/client/src/App.sass

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ code
181181
margin-bottom: 2.5rem
182182
@include mobile
183183
.header-spacing
184-
padding-bottom: 10px
185-
padding-top: 10px
184+
padding-bottom: 7px
185+
padding-top: 7px
186186
.section
187187
padding-top: 1.57rem !important
188188
padding-bottom: 3rem
@@ -303,15 +303,16 @@ hr
303303
.container > .navbar .navbar-brand
304304
margin-left: 0 !important
305305

306+
306307
@media (max-width: 769px)
307308
.section
308309
padding-right: 1rem
309310
padding-left: 1rem
310311
.navbar-burger
311312
display: block
312313
width: 1.25rem
313-
.navbar-brand
314-
flex-direction: row-reverse
314+
span
315+
height: 2px !important
315316
.navbar-start
316317
margin-bottom: 1rem
317318
a.navbar-item:hover

frontend/packages/client/src/components/Community/CommunityCard.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ const CommunityCard = ({ logo, name, body, id, slug, hideJoin }) => {
7878
className="is-flex is-align-items-center mr-2"
7979
style={{ maxWidth: 40 }}
8080
>
81-
<JoinCommunityButton communityId={id} />
81+
<JoinCommunityButton
82+
communityId={id}
83+
hasTooltip={isNotMobile}
84+
/>
8285
</div>
8386
)}
8487
</div>

frontend/packages/client/src/components/Community/JoinCommunityButton.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export default function JoinCommunityButton({
1212
onLeaveCommunity = async () => {},
1313
onJoinCommunity = async () => {},
1414
size = 'small',
15+
hasTooltip = false,
1516
}) {
1617
const [isModalErrorOpened, setIsModalErrorOpened] = useState(false);
1718
const { createCommunityUser, deleteUserFromCommunity } = useJoinCommunity();
@@ -109,7 +110,7 @@ export default function JoinCommunityButton({
109110
>
110111
<Svg name="Eye" />
111112
<Svg name="HideEye" />
112-
{!isMember && (
113+
{!isMember && hasTooltip && (
113114
<span className="join-community-cta py-2 px-4 rounded-lg has-text-white has-background-black smaller-text">
114115
Watch this community
115116
</span>

frontend/packages/client/src/components/Header.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,30 @@ function Header(props) {
2626
<div className="container header-spacing">
2727
<nav className="navbar is-transparent">
2828
<div className="navbar-brand">
29+
<span
30+
role="button"
31+
className="navbar-burger mr-2"
32+
onClick={openNavbarMenu}
33+
>
34+
<span />
35+
<span />
36+
<span />
37+
</span>
2938
<NavLink to="/" className="navbar-item p-0 mr-2">
30-
<div className="is-hidden-tablet">
31-
<Svg name="Logo" width={100} />
39+
<div className="is-hidden-tablet is-flex is-align-items-center">
40+
<Svg name="Logo" width={104} height={24} />
3241
</div>
33-
<div className="is-hidden-mobile">
42+
<div className="is-hidden-mobile is-flex is-align-items-center">
3443
<Svg name="Logo" />
3544
</div>
3645
</NavLink>
3746
<div className="is-flex is-align-items-center">
3847
<Label
48+
padding="py-1 px-3"
3949
labelText="Beta"
4050
classNames="has-text-weight-bold smallest-text is-uppercase"
4151
/>
4252
</div>
43-
<span
44-
role="button"
45-
className="navbar-burger mr-2"
46-
onClick={openNavbarMenu}
47-
>
48-
<span />
49-
<span />
50-
<span />
51-
</span>
5253
</div>
5354
<div className="navbar-end">
5455
<NavLink

frontend/packages/client/src/components/HomeHeader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function HomeHeader() {
1717

1818
return (
1919
<div
20-
className="is-flex is-flex-direction-column is-align-items-center is-justify-content-center py-7 has-background-light-grey"
20+
className="is-flex is-flex-direction-column is-align-items-center is-justify-content-center py-5-mobile py-7 has-background-light-grey"
2121
style={{
2222
position: 'relative',
2323
zIndex: 0, // needed for stars to show up

frontend/packages/client/src/components/Label.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
import classnames from 'classnames';
22

3-
export default function Label({ labelText = '', classNames } = {}) {
3+
export default function Label({
4+
labelText = '',
5+
padding = 'px-3 py-2',
6+
classNames,
7+
} = {}) {
48
const className = classnames(
5-
'has-background-black has-text-white rounded-lg px-3 py-2',
9+
'has-background-black has-text-white rounded-lg',
10+
{ [padding]: !!padding },
611
{ [classNames]: !!classNames }
712
);
813
return <span className={className}>{labelText}</span>;

frontend/packages/client/src/components/WalletConnect.js

Lines changed: 37 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const SignInOutButton = ({
1313
openWalletModal,
1414
injectedProvider,
1515
closeModal,
16+
expandToContainer,
1617
}) => {
1718
const notMobile = useMediaQuery();
1819

@@ -70,9 +71,31 @@ const SignInOutButton = ({
7071
{ 'is-primary': !loggedIn },
7172
{ 'px-2': !notMobile }
7273
);
73-
const addressStyle = classnames('', { 'smaller-text': !notMobile });
74+
const addressStyle = classnames('', { 'small-text': !notMobile });
7475

75-
return (
76+
return !loggedIn ? (
77+
<>
78+
<button
79+
onClick={connectWallet}
80+
className={buttonClass}
81+
style={
82+
expandToContainer
83+
? { width: '100%', height: '48px' }
84+
: notMobile
85+
? {
86+
width: '159px',
87+
height: '40px',
88+
}
89+
: { width: '121px', height: '32px' }
90+
}
91+
>
92+
<span className="has-text-weight-bold">Connect</span>
93+
<span className="is-hidden-mobile has-text-weight-bold">
94+
&nbsp;Wallet
95+
</span>
96+
</button>
97+
</>
98+
) : (
7699
<>
77100
<div className={dropdownBackground} />
78101
<div
@@ -91,29 +114,20 @@ const SignInOutButton = ({
91114
...(loggedIn ? { width: '147px' } : { width: '206px' }),
92115
height: '40px',
93116
}
94-
: { width: '105px', height: '32px' }
117+
: { width: '121px', height: '32px' }
95118
}
96119
>
97-
{loggedIn ? (
98-
<div className="is-flex is-align-items-center flex-1">
99-
<Blockies
100-
seed={addr}
101-
size={notMobile ? 6.5 : 5}
102-
scale={4}
103-
className="blockies"
104-
/>
105-
<div className="is-flex flex-1 is-justify-content-flex-end">
106-
<p className={addressStyle}>{truncateAddress(addr, 4, 4)}</p>
107-
</div>
120+
<div className="is-flex is-align-items-center flex-1">
121+
<Blockies
122+
seed={addr}
123+
size={notMobile ? 6.5 : 5}
124+
scale={4}
125+
className="blockies"
126+
/>
127+
<div className="is-flex flex-1 is-justify-content-flex-end pr-1-mobile">
128+
<p className={addressStyle}>{truncateAddress(addr, 4, 4)}</p>
108129
</div>
109-
) : (
110-
<>
111-
<span className="has-text-weight-bold">Connect</span>
112-
<span className="is-hidden-mobile has-text-weight-bold">
113-
&nbsp;Wallet
114-
</span>
115-
</>
116-
)}
130+
</div>
117131
</button>
118132
</div>
119133

@@ -122,7 +136,7 @@ const SignInOutButton = ({
122136
id="dropdown-menu"
123137
role="menu"
124138
ref={dropdownRef}
125-
style={!notMobile ? { left: '-170px' } : { left: '-130px' }}
139+
style={!notMobile ? { left: '-155px' } : { left: '-130px' }}
126140
>
127141
<div
128142
className="dropdown-content p-0 rounded"

frontend/packages/client/src/components/WalletConnectModal.js

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,25 @@ export default function WalletConnectModal({
3030
const listOfServices = useMemo(
3131
() =>
3232
sortBy(
33-
services.map((service) => ({
34-
connectToService: () => {
35-
if (service.uid !== 'Lilico') {
36-
fcl.config().put('discovery.wallet.method', service.method);
37-
}
38-
injectedProvider.authenticate(
39-
!IS_LOCAL_DEV ? { service } : undefined
40-
);
41-
closeModal();
42-
},
43-
icon: IS_LOCAL_DEV
44-
? getWalletIcon(service.provider)
45-
: service.provider.icon,
46-
name: service.provider.name,
47-
})),
33+
services
34+
.filter((service) => service.uid !== 'nufi#authn')
35+
.map((service) => {
36+
return {
37+
connectToService: () => {
38+
if (service.uid !== 'Lilico') {
39+
fcl.config().put('discovery.wallet.method', service.method);
40+
}
41+
injectedProvider.authenticate(
42+
!IS_LOCAL_DEV ? { service } : undefined
43+
);
44+
closeModal();
45+
},
46+
icon: IS_LOCAL_DEV
47+
? getWalletIcon(service.provider)
48+
: service.provider.icon,
49+
name: service.provider.name,
50+
};
51+
}),
4852
(service) => service.name
4953
),
5054
[services, closeModal, injectedProvider]

frontend/packages/client/src/pages/Home.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ export default function HomePage() {
2626
initialLoading: false,
2727
});
2828

29+
const isUserWalletConnected = !!addr;
30+
2931
const { isLoading: loadingFeaturedCommunities, data: featuredCommunities } =
3032
useFeaturedCommunities();
3133

@@ -74,7 +76,7 @@ export default function HomePage() {
7476
}}
7577
/>
7678
)}
77-
<HomeHeader />
79+
{!isUserWalletConnected && <HomeHeader />}
7880
<section className={classNames}>
7981
{(loading || loadingFeaturedCommunities) && (
8082
<div style={{ height: '50vh' }}>

0 commit comments

Comments
 (0)