Skip to content

Commit 9fedae4

Browse files
authored
Feat/alpha-polish-refactor (#118)
* updated landing page mock image made garden view fullscreen with fixed top and bottom nav added appbar animation * updated profile view with fixed user profile and tab list * made garden top view fixed * removed uneeded environment vars added react spinners for new beat loader updated animation for appbar fixed scroll issue when changing tabs updated login with react-intl
1 parent 19b9074 commit 9fedae4

33 files changed

+6478
-11423
lines changed

packages/client/.env.example

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# CLIENT EXPOSED VARIABLES
2-
VITE_ALCHEMY_API_KEY=
32
VITE_PRIVY_APP_ID=
4-
VITE_PIMLICO_API_KEY=
5-
VITE_PINATA_API_KEY=
3+
VITE_PINATA_JWT=
4+
VITE_WHISK_API_KEY=
65

6+
ALCHEMY_API_KEY=
77
PINATA_API_KEY=
8+
89
PINATA_API_SECRET=
910
PRIVY_APP_SECRET_ID=
11+
PRIVATE_KEY=

packages/client/dev-dist/sw.js

Lines changed: 44 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,20 @@ if (!self.define) {
2121

2222
const singleRequire = (uri, parentUri) => {
2323
uri = new URL(uri + ".js", parentUri).href;
24-
return registry[uri] || (
25-
26-
new Promise(resolve => {
27-
if ("document" in self) {
28-
const script = document.createElement("script");
29-
script.src = uri;
30-
script.onload = resolve;
31-
document.head.appendChild(script);
32-
} else {
33-
nextDefineUri = uri;
34-
importScripts(uri);
35-
resolve();
36-
}
37-
})
38-
39-
.then(() => {
24+
return (
25+
registry[uri] ||
26+
new Promise((resolve) => {
27+
if ("document" in self) {
28+
const script = document.createElement("script");
29+
script.src = uri;
30+
script.onload = resolve;
31+
document.head.appendChild(script);
32+
} else {
33+
nextDefineUri = uri;
34+
importScripts(uri);
35+
resolve();
36+
}
37+
}).then(() => {
4038
let promise = registry[uri];
4139
if (!promise) {
4240
throw new Error(`Module ${uri} didn’t register its module`);
@@ -47,27 +45,31 @@ if (!self.define) {
4745
};
4846

4947
self.define = (depsNames, factory) => {
50-
const uri = nextDefineUri || ("document" in self ? document.currentScript.src : "") || location.href;
48+
const uri =
49+
nextDefineUri ||
50+
("document" in self ? document.currentScript.src : "") ||
51+
location.href;
5152
if (registry[uri]) {
5253
// Module is already loading or loaded.
5354
return;
5455
}
5556
let exports = {};
56-
const require = depUri => singleRequire(depUri, uri);
57+
const require = (depUri) => singleRequire(depUri, uri);
5758
const specialDeps = {
5859
module: { uri },
5960
exports,
60-
require
61+
require,
6162
};
62-
registry[uri] = Promise.all(depsNames.map(
63-
depName => specialDeps[depName] || require(depName)
64-
)).then(deps => {
63+
registry[uri] = Promise.all(
64+
depsNames.map((depName) => specialDeps[depName] || require(depName))
65+
).then((deps) => {
6566
factory(...deps);
6667
return exports;
6768
});
6869
};
6970
}
70-
define(['./workbox-c982e567'], (function (workbox) { 'use strict';
71+
define(["./workbox-c982e567"], function (workbox) {
72+
"use strict";
7173

7274
self.skipWaiting();
7375
workbox.clientsClaim();
@@ -77,16 +79,23 @@ define(['./workbox-c982e567'], (function (workbox) { 'use strict';
7779
* requests for URLs in the manifest.
7880
* See https://goo.gl/S9QRab
7981
*/
80-
workbox.precacheAndRoute([{
81-
"url": "registerSW.js",
82-
"revision": "3ca0b8505b4bec776b69afdba2768812"
83-
}, {
84-
"url": "index.html",
85-
"revision": "0.33unft5d5v8"
86-
}], {});
82+
workbox.precacheAndRoute(
83+
[
84+
{
85+
url: "registerSW.js",
86+
revision: "3ca0b8505b4bec776b69afdba2768812",
87+
},
88+
{
89+
url: "index.html",
90+
revision: "0.6cjqtbs9mqg",
91+
},
92+
],
93+
{}
94+
);
8795
workbox.cleanupOutdatedCaches();
88-
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
89-
allowlist: [/^\/$/]
90-
}));
91-
92-
}));
96+
workbox.registerRoute(
97+
new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
98+
allowlist: [/^\/$/],
99+
})
100+
);
101+
});

packages/client/index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
5+
<meta
6+
name="viewport"
7+
content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no"
8+
/>
69
<meta
710
key="description"
811
name="description"

packages/client/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"@tailwindcss/vite": "^4.0.14",
2626
"@tanstack/react-query": "^5.52.2",
2727
"@urql/core": "^5.0.4",
28+
"browser-lang": "0.2.1",
2829
"clsx": "2.1.1",
2930
"embla-carousel-react": "^8.5.2",
3031
"gql.tada": "^1.8.10",
@@ -37,6 +38,7 @@
3738
"react-intl": "6.6.8",
3839
"react-router-dom": "^6.26.1",
3940
"react-select": "5.8.0",
41+
"react-spinners": "0.15.0",
4042
"tailwind-merge": "3.0.2",
4143
"tailwind-variants": "0.3.1",
4244
"zod": "^3.23.8"
@@ -50,6 +52,7 @@
5052
"@testing-library/jest-dom": "6.6.3",
5153
"@testing-library/react": "16.1.0",
5254
"@testing-library/user-event": "14.5.2",
55+
"@types/browser-lang": "0.1.2",
5356
"@types/react": "^18.3.3",
5457
"@types/react-dom": "^18.3.0",
5558
"@vercel/node": "3.2.10",

packages/client/src/App.tsx

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Toaster } from "react-hot-toast";
12
import { usePrivy } from "@privy-io/react-auth";
23
import { QueryClientProvider } from "@tanstack/react-query";
34
import { Route, Routes, Navigate, BrowserRouter } from "react-router-dom";
@@ -10,7 +11,7 @@ import { GardensProvider } from "@/providers/garden";
1011
import { useApp } from "@/providers/app";
1112
import { useUser } from "@/providers/user";
1213

13-
import { CircleLoader } from "@/components/Loader";
14+
import { CircleLoader } from "@/components/UI/Loader";
1415
import { AppBar } from "@/components/Layout/AppBar";
1516

1617
import AppViews from "@/views";
@@ -22,9 +23,7 @@ function App() {
2223
const { isMobile, isInstalled } = useApp();
2324
const { ready, smartAccountAddress } = useUser();
2425

25-
const desktopBypass = import.meta.env.VITE_DESKTOP_DEV;
26-
27-
const isDownloaded = (isMobile && isInstalled) || desktopBypass;
26+
const isDownloaded = (isMobile && isInstalled) || import.meta.env.DEV;
2827
const isAuthenticated = authenticated && smartAccountAddress;
2928

3029
return (
@@ -34,45 +33,44 @@ function App() {
3433
{/* Landing */}
3534
<Route
3635
path="/landing"
37-
element={isDownloaded ? <Navigate to="/" replace /> : <Landing />}
36+
element={
37+
isDownloaded ?
38+
<Navigate to="/" replace />
39+
: <>
40+
<Landing />
41+
<Toaster />
42+
</>
43+
}
3844
/>
3945
{/* Login */}
4046
<Route
4147
path="/login"
4248
element={
43-
isDownloaded ? (
44-
!isAuthenticated && !ready ? (
49+
isDownloaded ?
50+
!isAuthenticated && !ready ?
4551
<main className="w-full h-full grid place-items-center">
4652
<CircleLoader />
4753
</main>
48-
) : !isAuthenticated ? (
54+
: !isAuthenticated ?
4955
<Login />
50-
) : (
51-
<Navigate to="/" replace />
52-
)
53-
) : (
54-
<Navigate to="/landing" replace />
55-
)
56+
: <Navigate to="/" replace />
57+
: <Navigate to="/landing" replace />
5658
}
5759
/>
5860
{/* Main: Show app or navigate to login, onboarding, or landing page based on conditions */}
5961
<Route
6062
path="*"
6163
element={
62-
isDownloaded ? (
63-
isAuthenticated ? (
64+
isDownloaded ?
65+
isAuthenticated ?
6466
<GardensProvider>
6567
<WorkProvider>
6668
<AppViews />
6769
<AppBar />
6870
</WorkProvider>
6971
</GardensProvider>
70-
) : (
71-
<Navigate to="/login" replace />
72-
)
73-
) : (
74-
<Navigate to="/landing" replace />
75-
)
72+
: <Navigate to="/login" replace />
73+
: <Navigate to="/landing" replace />
7674
}
7775
/>
7876
{/* Catch-all: Redirect to the appropriate place */}

0 commit comments

Comments
 (0)