@openstack_dev/gatsby-theme-marketing-oif-core 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/gatsby-config.js CHANGED
@@ -17,8 +17,6 @@ try {
17
17
  console.log("Falling back to default site settings.");
18
18
  }
19
19
 
20
- console.log("loaded siteSettings on gatsby config ...", siteSettings);
21
-
22
20
  const title = siteSettings?.siteMetadata?.title || process.env.GATSBY_METADATA_TITLE;
23
21
  const description = siteSettings?.siteMetadata?.description
24
22
  || process.env.GATSBY_METADATA_DESCRIPTION;
@@ -217,12 +215,15 @@ const plugins = [
217
215
  "gatsby-plugin-netlify", // make sure to keep it last in the array
218
216
  ];
219
217
 
220
- console.log(`title ${title} description ${description}`);
221
-
222
218
  module.exports = {
223
219
  siteMetadata: {
224
220
  title,
225
221
  description,
226
222
  },
227
223
  plugins,
224
+ /*
225
+ flags: {
226
+ DEV_SSR: true,
227
+ },
228
+ */
228
229
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openstack_dev/gatsby-theme-marketing-oif-core",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Base theme for Marketing Sites",
5
5
  "author": "smarcet",
6
6
  "keywords": [
@@ -28,6 +28,11 @@ function Navbar({ isLoggedUser, member }) {
28
28
  const [navbarMenu, setNavbarMenu] = React.useState(null);
29
29
  const [isMobileMenuOpen, setIsMobileMenuOpen] = React.useState(false);
30
30
  const [isSearchBarOpen, setIsSearchBarOpen] = React.useState(false);
31
+ const [domLoaded, setDomLoaded] = React.useState(false);
32
+
33
+ React.useEffect(() => {
34
+ setDomLoaded(true);
35
+ }, []);
31
36
 
32
37
  const handleSetActiveMenu = (option) => {
33
38
  setNavbarMenu(navbarMenu === option ? null : option);
@@ -73,381 +78,393 @@ function Navbar({ isLoggedUser, member }) {
73
78
  };
74
79
 
75
80
  return (
76
- <nav role="navigation">
77
- <Script
78
- src={`${getEnvVariable(SEARCH_WIDGET_BASE_URL)}/widget/embed.min.js`}
79
- onLoad={() => console.log("Script loaded")}
80
- />
81
- <AppBar
82
- position="static"
83
- className={styles.navbar}
84
- sx={{ backgroundColor: "#fff", boxShadow: "none" }}
85
- >
86
- <Container maxWidth="xl">
87
- <Toolbar disableGutters sx={{ flexWrap: "wrap" }}>
88
- <Box className={styles.navbarHeader}>
89
- <div className={styles.brandWrapper}>
90
- <a
91
- className={styles.navbarBrand}
92
- href="/"
93
- alt="Openstack logo"
94
- aria-label="Go to homepage"
95
- />
96
- </div>
97
- <Box
98
- className={styles.searchWrapper}
99
- sx={{ display: { xs: "none", md: "flex" } }}
100
- >
101
- <div
102
- role="button"
103
- tabIndex={0}
104
- onKeyDown={(event) => {
105
- if (event.key === "Enter" || event.key === " ") setIsSearchBarOpen(true);
106
- }}
107
- onClick={() => setIsSearchBarOpen(true)}
108
- className={styles.searchComponent}
81
+ <>
82
+ {domLoaded && (
83
+ <nav role="navigation">
84
+ <Script
85
+ src={`${getEnvVariable(
86
+ SEARCH_WIDGET_BASE_URL,
87
+ )}/widget/embed.min.js`}
88
+ onLoad={() => console.log("Script loaded")}
89
+ />
90
+ <AppBar
91
+ position="static"
92
+ className={styles.navbar}
93
+ sx={{ backgroundColor: "#fff", boxShadow: "none" }}
94
+ >
95
+ <Container maxWidth="xl">
96
+ <Toolbar disableGutters sx={{ flexWrap: "wrap" }}>
97
+ <Box className={styles.navbarHeader}>
98
+ <div className={styles.brandWrapper}>
99
+ <a
100
+ className={styles.navbarBrand}
101
+ href="/"
102
+ alt="Openstack logo"
103
+ aria-label="Go to homepage"
104
+ />
105
+ </div>
106
+ <Box
107
+ className={styles.searchWrapper}
108
+ sx={{ display: { xs: "none", md: "flex" } }}
109
+ >
110
+ <div
111
+ role="button"
112
+ tabIndex={0}
113
+ onKeyDown={(event) => {
114
+ if (event.key === "Enter" || event.key === " ") setIsSearchBarOpen(true);
115
+ }}
116
+ onClick={() => setIsSearchBarOpen(true)}
117
+ className={styles.searchComponent}
118
+ >
119
+ <SearchIcon className={styles.searchIcon} />
120
+ <span className={styles.headerSearchText}>Search</span>
121
+ </div>
122
+ <Box
123
+ className={`openstack-search-bar ${styles.openstackSearchBar}`}
124
+ style={{
125
+ visibility: isSearchBarOpen ? "visible" : "hidden",
126
+ opacity: isSearchBarOpen ? "1" : "0",
127
+ }}
128
+ data-baseurl={getEnvVariable(SEARCH_WIDGET_BASE_URL)}
129
+ data-context="www-openstack"
130
+ />
131
+ </Box>
132
+ </Box>
133
+ {/* Mobile Menu */}
134
+ <Box
135
+ className={styles.mobileMenuWrapper}
136
+ sx={{ flexGrow: 1, display: { xs: "flex", md: "none" } }}
109
137
  >
110
- <SearchIcon className={styles.searchIcon} />
111
- <span className={styles.headerSearchText}>Search</span>
112
- </div>
138
+ <IconButton
139
+ className={styles.toggleIcon}
140
+ size="large"
141
+ aria-label="account of current user"
142
+ aria-controls="menu-appbar"
143
+ aria-haspopup="true"
144
+ onClick={() => handleMobileMenuToggle()}
145
+ color="inherit"
146
+ >
147
+ <MenuIcon />
148
+ </IconButton>
149
+ </Box>
150
+ {/* Desktop Menu */}
113
151
  <Box
114
- className={`openstack-search-bar ${styles.openstackSearchBar}`}
115
- style={{
116
- visibility: isSearchBarOpen ? "visible" : "hidden",
117
- opacity: isSearchBarOpen ? "1" : "0",
152
+ sx={{
153
+ flexGrow: 1,
154
+ display: {
155
+ xs: "none",
156
+ md: isSearchBarOpen ? "none" : "flex",
157
+ },
158
+ justifyContent: "flex-end",
118
159
  }}
119
- data-baseurl={getEnvVariable(SEARCH_WIDGET_BASE_URL)}
120
- data-context="www-openstack"
121
- />
122
- </Box>
123
- </Box>
124
- {/* Mobile Menu */}
125
- <Box
126
- className={styles.mobileMenuWrapper}
127
- sx={{ flexGrow: 1, display: { xs: "flex", md: "none" } }}
128
- >
129
- <IconButton
130
- className={styles.toggleIcon}
131
- size="large"
132
- aria-label="account of current user"
133
- aria-controls="menu-appbar"
134
- aria-haspopup="true"
135
- onClick={() => handleMobileMenuToggle()}
136
- color="inherit"
137
- >
138
- <MenuIcon />
139
- </IconButton>
140
- </Box>
141
- {/* Desktop Menu */}
142
- <Box
143
- sx={{
144
- flexGrow: 1,
145
- display: { xs: "none", md: isSearchBarOpen ? "none" : "flex" },
146
- justifyContent: "flex-end",
147
- }}
148
- >
149
- {navbarContent.items.map(
150
- (item) => item.display && (
151
- <Button
152
- className={styles.navbarOption}
153
- key={item.title}
154
- sx={{ my: 2, display: "block" }}
155
- disableRipple
156
- onClick={() => handleNavigation(item.link)}
157
- >
158
- {item.items?.length > 0 ? (
159
- <>
160
- {item.title}
161
- <ArrowDropDownIcon className={styles.arrowDownIcon} />
162
- <Box className={styles.dropDownMenu}>
163
- {item.items.map((subItem) => (!subItem.title && !subItem.link ? (
164
- <div className={styles.divider} />
165
- ) : (
166
- <Button
167
- className={styles.dropdownMenuOption}
168
- key={subItem.title}
169
- onClick={() => handleNavigation(subItem.link)}
170
- sx={{ display: "block" }}
171
- disableRipple
172
- >
173
- {subItem.title}
174
- </Button>
175
- )))}
176
- </Box>
177
- </>
178
- ) : (
179
- item.title
180
- )}
181
- </Button>
182
- ),
183
- )}
184
- </Box>
185
- {isLoggedUser ? (
186
- <Box
187
- maxWidth="15%"
188
- sx={{
189
- display: {
190
- xs: "none",
191
- md: isSearchBarOpen ? "none" : "flex",
192
- },
193
- justifyContent: "flex-end",
194
- marginLeft: "auto",
195
- }}
196
- >
197
- <Button
198
- className={`${styles.navbarOption}`}
199
- sx={{ my: 2, display: "block" }}
200
- disableRipple
201
160
  >
202
- My Account
203
- <ArrowDropDownIcon className={styles.arrowDownIcon} />
204
- <Box className={styles.dropDownMenu}>
161
+ {navbarContent.items.map(
162
+ (item) => item.display && (
205
163
  <Button
206
- className={styles.dropdownMenuOption}
207
- onClick={() => handleNavigation("/profile/")}
208
- sx={{ display: "block" }}
164
+ className={styles.navbarOption}
165
+ key={item.title}
166
+ sx={{ my: 2, display: "block" }}
209
167
  disableRipple
168
+ onClick={() => handleNavigation(item.link)}
210
169
  >
211
- Edit Profile
212
- </Button>
213
- <Button
214
- className={styles.dropdownMenuOption}
215
- onClick={() => handleNavigation(
216
- `/community/members/profile/${
217
- member.id
218
- }/${`${member.first_name.toLowerCase()}-${member.last_name.toLowerCase()}`}`,
170
+ {item.items?.length > 0 ? (
171
+ <>
172
+ {item.title}
173
+ <ArrowDropDownIcon
174
+ className={styles.arrowDownIcon}
175
+ />
176
+ <Box className={styles.dropDownMenu}>
177
+ {item.items.map((subItem) => (!subItem.title && !subItem.link ? (
178
+ <div className={styles.divider} />
179
+ ) : (
180
+ <Button
181
+ className={styles.dropdownMenuOption}
182
+ key={subItem.title}
183
+ onClick={() => handleNavigation(subItem.link)}
184
+ sx={{ display: "block" }}
185
+ disableRipple
186
+ >
187
+ {subItem.title}
188
+ </Button>
189
+ )))}
190
+ </Box>
191
+ </>
192
+ ) : (
193
+ item.title
219
194
  )}
220
- sx={{ display: "block" }}
221
- disableRipple
222
- >
223
- View Public Profile
224
195
  </Button>
225
- <div className={styles.divider} />
196
+ ),
197
+ )}
198
+ </Box>
199
+ {isLoggedUser ? (
200
+ <Box
201
+ maxWidth="15%"
202
+ sx={{
203
+ display: {
204
+ xs: "none",
205
+ md: isSearchBarOpen ? "none" : "flex",
206
+ },
207
+ justifyContent: "flex-end",
208
+ marginLeft: "auto",
209
+ }}
210
+ >
226
211
  <Button
227
- className={styles.dropdownMenuOption}
228
- sx={{ display: "block" }}
229
- onClick={onClickLogout}
212
+ className={`${styles.navbarOption}`}
213
+ sx={{ my: 2, display: "block" }}
230
214
  disableRipple
231
215
  >
232
- Log out
216
+ My Account
217
+ <ArrowDropDownIcon className={styles.arrowDownIcon} />
218
+ <Box className={styles.dropDownMenu}>
219
+ <Button
220
+ className={styles.dropdownMenuOption}
221
+ onClick={() => handleNavigation("/profile/")}
222
+ sx={{ display: "block" }}
223
+ disableRipple
224
+ >
225
+ Edit Profile
226
+ </Button>
227
+ <Button
228
+ className={styles.dropdownMenuOption}
229
+ onClick={() => handleNavigation(
230
+ `/community/members/profile/${
231
+ member.id
232
+ }/${`${member.first_name.toLowerCase()}-${member.last_name.toLowerCase()}`}`,
233
+ )}
234
+ sx={{ display: "block" }}
235
+ disableRipple
236
+ >
237
+ View Public Profile
238
+ </Button>
239
+ <div className={styles.divider} />
240
+ <Button
241
+ className={styles.dropdownMenuOption}
242
+ sx={{ display: "block" }}
243
+ onClick={onClickLogout}
244
+ disableRipple
245
+ >
246
+ Log out
247
+ </Button>
248
+ </Box>
233
249
  </Button>
234
250
  </Box>
235
- </Button>
236
- </Box>
237
- ) : (
238
- <Box
239
- maxWidth="15%"
240
- sx={{
241
- display: {
242
- xs: "none",
243
- md: isSearchBarOpen ? "none" : "flex",
244
- },
245
- justifyContent: "flex-end",
246
- marginLeft: "auto",
247
- }}
248
- >
249
- <Button
250
- className={`${styles.navbarOption} ${styles.join}`}
251
- sx={{ my: 2, display: "block" }}
252
- disableRipple
253
- >
254
- Join
255
- <ArrowDropDownIcon className={styles.arrowDownIcon} />
256
- <Box className={styles.dropDownMenu}>
257
- <Button
258
- className={styles.dropdownMenuOption}
259
- onClick={() => handleNavigation("https://openinfra.dev/join")}
260
- sx={{ display: "block" }}
261
- disableRipple
262
- >
263
- Sign up for Foundation Membership
264
- </Button>
251
+ ) : (
252
+ <Box
253
+ maxWidth="15%"
254
+ sx={{
255
+ display: {
256
+ xs: "none",
257
+ md: isSearchBarOpen ? "none" : "flex",
258
+ },
259
+ justifyContent: "flex-end",
260
+ marginLeft: "auto",
261
+ }}
262
+ >
265
263
  <Button
266
- className={styles.dropdownMenuOption}
267
- onClick={() => handleNavigation("https://openinfra.dev/join")}
268
- sx={{ display: "block" }}
264
+ className={`${styles.navbarOption} ${styles.join}`}
265
+ sx={{ my: 2, display: "block" }}
269
266
  disableRipple
270
267
  >
271
- Sponsor the Foundation
268
+ Join
269
+ <ArrowDropDownIcon className={styles.arrowDownIcon} />
270
+ <Box className={styles.dropDownMenu}>
271
+ <Button
272
+ className={styles.dropdownMenuOption}
273
+ onClick={() => handleNavigation("https://openinfra.dev/join")}
274
+ sx={{ display: "block" }}
275
+ disableRipple
276
+ >
277
+ Sign up for Foundation Membership
278
+ </Button>
279
+ <Button
280
+ className={styles.dropdownMenuOption}
281
+ onClick={() => handleNavigation("https://openinfra.dev/join")}
282
+ sx={{ display: "block" }}
283
+ disableRipple
284
+ >
285
+ Sponsor the Foundation
286
+ </Button>
287
+ <Button
288
+ className={styles.dropdownMenuOption}
289
+ onClick={() => handleNavigation("https://openinfra.dev")}
290
+ sx={{ display: "block" }}
291
+ disableRipple
292
+ >
293
+ More about the Foundation
294
+ </Button>
295
+ </Box>
272
296
  </Button>
273
297
  <Button
274
- className={styles.dropdownMenuOption}
275
- onClick={() => handleNavigation("https://openinfra.dev")}
276
- sx={{ display: "block" }}
298
+ className={`${styles.navbarOption} ${styles.login}`}
299
+ onClick={() => doLogin("/")}
300
+ sx={{ my: 2, display: "block" }}
277
301
  disableRipple
278
302
  >
279
- More about the Foundation
303
+ Log in
280
304
  </Button>
281
305
  </Box>
282
- </Button>
283
- <Button
284
- className={`${styles.navbarOption} ${styles.login}`}
285
- onClick={() => doLogin("/")}
286
- sx={{ my: 2, display: "block" }}
287
- disableRipple
306
+ )}
307
+ </Toolbar>
308
+ <Box
309
+ className={`${styles.openstackSearchBarMobile} openstack-search-bar ossw-mobile`}
310
+ sx={{
311
+ visibility: {
312
+ xs: isMobileMenuOpen ? "visible" : "hidden",
313
+ md: "hidden",
314
+ },
315
+ opacity: { xs: isMobileMenuOpen ? "1" : "0", md: "0" },
316
+ height: { xs: isMobileMenuOpen ? "auto" : 0, md: 0 },
317
+ color: "#8a959e",
318
+ }}
319
+ data-baseurl={getEnvVariable(SEARCH_WIDGET_BASE_URL)}
320
+ data-context="www-openstack"
321
+ />
322
+ {isMobileMenuOpen && (
323
+ <Box
324
+ className={styles.navbarMobileMenu}
325
+ sx={{
326
+ display: { xs: "flex", md: "none" },
327
+ }}
288
328
  >
289
- Log in
290
- </Button>
291
- </Box>
292
- )}
293
- </Toolbar>
294
- <Box
295
- className={`${styles.openstackSearchBarMobile} openstack-search-bar ossw-mobile`}
296
- sx={{
297
- visibility: {
298
- xs: isMobileMenuOpen ? "visible" : "hidden",
299
- md: "hidden",
300
- },
301
- opacity: { xs: isMobileMenuOpen ? "1" : "0", md: "0" },
302
- height: { xs: isMobileMenuOpen ? "auto" : 0, md: 0 },
303
- color: "#8a959e",
304
- }}
305
- data-baseurl={getEnvVariable(SEARCH_WIDGET_BASE_URL)}
306
- data-context="www-openstack"
307
- />
308
- {isMobileMenuOpen && (
309
- <Box
310
- className={styles.navbarMobileMenu}
311
- sx={{
312
- display: { xs: "flex", md: "none" },
313
- }}
314
- >
315
- {navbarContent.items.map(
316
- (item) => item.display && (
317
- <>
318
- <Button
319
- disableRipple
320
- className={styles.mobileOption}
321
- key={`${item.title}-mobile`}
322
- onClick={() => handleSetActiveMenu(item.title)}
323
- >
324
- {item.title}
325
- {item.items?.length > 0
326
- && (item.title === navbarMenu ? (
327
- <RemoveIcon aria-hidden="true" />
328
- ) : (
329
- <AddIcon aria-hidden="true" />
330
- ))}
331
- </Button>
332
- {item.items?.length > 0 && item.title === navbarMenu && (
333
- <Box className={styles.mobileDropdownMenu}>
334
- {item.items.map((subItem) => (!subItem.title && !subItem.link ? (
335
- <div className={styles.divider} />
336
- ) : (
329
+ {navbarContent.items.map(
330
+ (item) => item.display && (
331
+ <>
337
332
  <Button
338
- className={styles.mobileDropdownOption}
339
- key={subItem.title}
340
- onClick={() => handleNavigation(subItem.link)}
341
- sx={{ display: "block" }}
342
333
  disableRipple
334
+ className={styles.mobileOption}
335
+ key={`${item.title}-mobile`}
336
+ onClick={() => handleSetActiveMenu(item.title)}
343
337
  >
344
- {subItem.title}
338
+ {item.title}
339
+ {item.items?.length > 0
340
+ && (item.title === navbarMenu ? (
341
+ <RemoveIcon aria-hidden="true" />
342
+ ) : (
343
+ <AddIcon aria-hidden="true" />
344
+ ))}
345
345
  </Button>
346
- )))}
347
- </Box>
346
+ {item.items?.length > 0
347
+ && item.title === navbarMenu && (
348
+ <Box className={styles.mobileDropdownMenu}>
349
+ {item.items.map((subItem) => (!subItem.title && !subItem.link ? (
350
+ <div className={styles.divider} />
351
+ ) : (
352
+ <Button
353
+ className={styles.mobileDropdownOption}
354
+ key={subItem.title}
355
+ onClick={() => handleNavigation(subItem.link)}
356
+ sx={{ display: "block" }}
357
+ disableRipple
358
+ >
359
+ {subItem.title}
360
+ </Button>
361
+ )))}
362
+ </Box>
363
+ )}
364
+ </>
365
+ ),
348
366
  )}
349
- </>
350
- ),
351
- )}
352
- {isLoggedUser ? (
353
- <>
354
- <Button
355
- className={styles.mobileOption}
356
- onClick={() => handleSetActiveMenu("My Account")}
357
- disableRipple
358
- >
359
- My Account
360
- {navbarMenu === "My Account" ? (
361
- <RemoveIcon aria-hidden="true" />
362
- ) : (
363
- <AddIcon aria-hidden="true" />
364
- )}
365
- </Button>
366
- {navbarMenu === "My Account" && (
367
- <Box className={styles.mobileDropdownMenu}>
367
+ {isLoggedUser ? (
368
+ <>
368
369
  <Button
369
- className={styles.mobileDropdownOption}
370
- onClick={() => handleNavigation("/profile/")}
371
- sx={{ display: "block" }}
370
+ className={styles.mobileOption}
371
+ onClick={() => handleSetActiveMenu("My Account")}
372
372
  disableRipple
373
373
  >
374
- Edit Profile
375
- </Button>
376
- <Button
377
- className={styles.mobileDropdownOption}
378
- onClick={() => handleNavigation(
379
- `/community/members/profile/${
380
- member.id
381
- }/${`${member.first_name.toLowerCase()}-${member.last_name.toLowerCase()}`}`,
374
+ My Account
375
+ {navbarMenu === "My Account" ? (
376
+ <RemoveIcon aria-hidden="true" />
377
+ ) : (
378
+ <AddIcon aria-hidden="true" />
382
379
  )}
383
- sx={{ display: "block" }}
384
- disableRipple
385
- >
386
- View Public Profile
387
- </Button>
388
- <div className={styles.divider} />
389
- <Button
390
- className={styles.mobileDropdownOption}
391
- sx={{ display: "block" }}
392
- onClick={onClickLogout}
393
- disableRipple
394
- >
395
- Log out
396
- </Button>
397
- </Box>
398
- )}
399
- </>
400
- ) : (
401
- <Box>
402
- <Button
403
- className={`${styles.navbarOption} ${styles.join}`}
404
- sx={{ my: 2, display: "block" }}
405
- disableRipple
406
- >
407
- Join
408
- <ArrowDropDownIcon className={styles.arrowDownIcon} />
409
- <Box className={styles.dropDownMenu}>
410
- <Button
411
- className={styles.dropdownMenuOption}
412
- onClick={() => handleNavigation("https://openinfra.dev/join")}
413
- sx={{ display: "block" }}
414
- disableRipple
415
- >
416
- Sign up for Foundation Membership
417
380
  </Button>
381
+ {navbarMenu === "My Account" && (
382
+ <Box className={styles.mobileDropdownMenu}>
383
+ <Button
384
+ className={styles.mobileDropdownOption}
385
+ onClick={() => handleNavigation("/profile/")}
386
+ sx={{ display: "block" }}
387
+ disableRipple
388
+ >
389
+ Edit Profile
390
+ </Button>
391
+ <Button
392
+ className={styles.mobileDropdownOption}
393
+ onClick={() => handleNavigation(
394
+ `/community/members/profile/${
395
+ member.id
396
+ }/${`${member.first_name.toLowerCase()}-${member.last_name.toLowerCase()}`}`,
397
+ )}
398
+ sx={{ display: "block" }}
399
+ disableRipple
400
+ >
401
+ View Public Profile
402
+ </Button>
403
+ <div className={styles.divider} />
404
+ <Button
405
+ className={styles.mobileDropdownOption}
406
+ sx={{ display: "block" }}
407
+ onClick={onClickLogout}
408
+ disableRipple
409
+ >
410
+ Log out
411
+ </Button>
412
+ </Box>
413
+ )}
414
+ </>
415
+ ) : (
416
+ <Box>
418
417
  <Button
419
- className={styles.dropdownMenuOption}
420
- onClick={() => handleNavigation("https://openinfra.dev/join")}
421
- sx={{ display: "block" }}
418
+ className={`${styles.navbarOption} ${styles.join}`}
419
+ sx={{ my: 2, display: "block" }}
422
420
  disableRipple
423
421
  >
424
- Sponsor the Foundation
422
+ Join
423
+ <ArrowDropDownIcon className={styles.arrowDownIcon} />
424
+ <Box className={styles.dropDownMenu}>
425
+ <Button
426
+ className={styles.dropdownMenuOption}
427
+ onClick={() => handleNavigation("https://openinfra.dev/join")}
428
+ sx={{ display: "block" }}
429
+ disableRipple
430
+ >
431
+ Sign up for Foundation Membership
432
+ </Button>
433
+ <Button
434
+ className={styles.dropdownMenuOption}
435
+ onClick={() => handleNavigation("https://openinfra.dev/join")}
436
+ sx={{ display: "block" }}
437
+ disableRipple
438
+ >
439
+ Sponsor the Foundation
440
+ </Button>
441
+ <Button
442
+ className={styles.dropdownMenuOption}
443
+ onClick={() => handleNavigation("https://openinfra.dev")}
444
+ sx={{ display: "block" }}
445
+ disableRipple
446
+ >
447
+ More about the Foundation
448
+ </Button>
449
+ </Box>
425
450
  </Button>
426
451
  <Button
427
- className={styles.dropdownMenuOption}
428
- onClick={() => handleNavigation("https://openinfra.dev")}
429
- sx={{ display: "block" }}
452
+ className={`${styles.navbarOption} ${styles.login}`}
453
+ onClick={() => doLogin("/")}
454
+ sx={{ my: 2, display: "block" }}
430
455
  disableRipple
431
456
  >
432
- More about the Foundation
457
+ Log in
433
458
  </Button>
434
459
  </Box>
435
- </Button>
436
- <Button
437
- className={`${styles.navbarOption} ${styles.login}`}
438
- onClick={() => doLogin("/")}
439
- sx={{ my: 2, display: "block" }}
440
- disableRipple
441
- >
442
- Log in
443
- </Button>
460
+ )}
444
461
  </Box>
445
462
  )}
446
- </Box>
447
- )}
448
- </Container>
449
- </AppBar>
450
- </nav>
463
+ </Container>
464
+ </AppBar>
465
+ </nav>
466
+ )}
467
+ </>
451
468
  );
452
469
  }
453
470
 
@@ -26,7 +26,7 @@ function Seo({
26
26
  url: buildUrl(scheme, host, pathname),
27
27
  image: host && image ? buildUrl(scheme, host, getSrc(image)) : null,
28
28
  };
29
- console.log("SEO", seo);
29
+
30
30
  return (
31
31
  <>
32
32
  {seo.title && <title>{seo.title}</title>}
@@ -1 +1 @@
1
- { "staticJsonFilesBuildTime": [], "lastBuild": 1713848863370 }
1
+ { "staticJsonFilesBuildTime": [], "lastBuild": 1713872964380 }
@@ -3,21 +3,10 @@ import { Provider } from "react-redux";
3
3
  import { PersistGate } from "redux-persist/integration/react";
4
4
  import { store, persistor } from "./store";
5
5
 
6
- const onBeforeLift = () => {
7
- const params = new URLSearchParams(window.location.search);
8
- const flush = params.has("flushState");
9
-
10
- if (flush) {
11
- // store.dispatch({ type: RESET_STATE, payload: null });
12
- }
13
- };
14
-
15
6
  function ReduxWrapper({ element }) {
16
7
  return (
17
8
  <Provider store={store}>
18
- <PersistGate onBeforeLift={onBeforeLift} persistor={persistor}>
19
- {() => element}
20
- </PersistGate>
9
+ <PersistGate persistor={persistor}>{() => element}</PersistGate>
21
10
  </Provider>
22
11
  );
23
12
  }
@@ -21,13 +21,11 @@ const states = {
21
21
  loggedUserState: reducers.loggedUserReducer,
22
22
  };
23
23
 
24
- const appendLoggedUser = () => (next) => (action) => next(action);
25
-
26
24
  const composeEnhancers = typeof window === "object" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
27
25
  ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
28
26
  : compose;
29
27
 
30
- const enhancer = composeEnhancers(applyMiddleware(appendLoggedUser, thunk));
28
+ const enhancer = composeEnhancers(applyMiddleware(thunk));
31
29
 
32
30
  // Create store with persistor
33
31
  export const { store, persistor } = (() => {
@@ -1,21 +0,0 @@
1
- import createWebStorage from "redux-persist/lib/storage/createWebStorage";
2
- // create a mock storage for SSR
3
- const createNoopStorage = () => {
4
- return {
5
- getItem(_key) {
6
- return Promise.resolve(null);
7
- },
8
- setItem(_key, value) {
9
- return Promise.resolve(value);
10
- },
11
- removeItem(_key) {
12
- return Promise.resolve();
13
- },
14
- };
15
- };
16
-
17
- // and set the proper storege depending if we are in browser side or SSR side
18
- // because you cannot create the local storage in Node.js
19
- const storage = typeof window !== "undefined" ? createWebStorage("local") : createNoopStorage();
20
-
21
- export default storage;