Skip to content

Commit 1cfd32a

Browse files
committed
feat: otp page looks nice now
1 parent 53551d4 commit 1cfd32a

File tree

20 files changed

+538
-166
lines changed

20 files changed

+538
-166
lines changed

apps/webview/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
5+
<link rel="icon" type="image/svg+xml" href="/GC.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>gc-web</title>
88
</head>

apps/webview/package-lock.json

Lines changed: 36 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/webview/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@
1111
"type-check": "tsc --noEmit"
1212
},
1313
"dependencies": {
14+
"clsx": "^2.1.1",
15+
"input-otp": "^1.4.1",
1416
"lucide-react": "^0.469.0",
1517
"react": "^18.3.1",
1618
"react-dom": "^18.3.1",
1719
"react-hook-form": "^7.54.2",
1820
"react-router-dom": "^7.0.2",
1921
"swiper": "^11.1.15",
22+
"tailwind-merge": "^2.6.0",
2023
"zustand": "^5.0.2"
2124
},
2225
"devDependencies": {
@@ -32,7 +35,7 @@
3235
"eslint-plugin-react-refresh": "^0.4.14",
3336
"globals": "^15.12.0",
3437
"postcss": "^8.4.49",
35-
"tailwindcss": "^3.4.16",
38+
"tailwindcss": "^3.4.17",
3639
"typescript": "^5.7.2",
3740
"vite": "^6.0.1"
3841
}

apps/webview/public/GC.svg

Lines changed: 127 additions & 0 deletions
Loading

apps/webview/src/App.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { BrowserRouter as Router, Routes, Route} from 'react-router-dom';
22
import React from "react";
3-
import './assets/css/global/page.css'
4-
import SwiperOnboard from "./assets/pages/onboarding/onboard";
5-
import Dashboard from "./assets/pages/dashboard/dashboard";
6-
import OnboardingLast from './assets/pages/onboarding/onboard_last';
7-
import LoginApp from './assets/pages/auth/login';
8-
import RegisterApp from './assets/pages/auth/register';
3+
import './page.css'
4+
import SwiperOnboard from "./pages/onboarding/onboard";
5+
import Dashboard from "./pages/dashboard/dashboard";
6+
import OnboardingLast from './pages/onboarding/onboard_last';
7+
import LoginApp from './pages/auth/login';
8+
import RegisterApp from './pages/auth/register';
99
import { ProtectedRoute } from './components/protectedRoute';
1010
import { AuthProvider } from "./hooks/useAuth";
1111

apps/webview/src/assets/css/auth/register.css

Lines changed: 0 additions & 121 deletions
This file was deleted.

apps/webview/src/hooks/useAuth.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interface AuthContextType {
1111
const AuthContext = createContext<AuthContextType | null>(null);
1212

1313
export const AuthProvider: React.FC<{ children?: ReactNode }> = ({children}) => {
14-
const [userData, setUserData] = useLocalStorage<string | null>("userData", null);
14+
const [userData, setUserData, clearUserData] = useLocalStorage<string | null>("userData", null);
1515
const navigate = useNavigate();
1616

1717
// call this function when you want to authenticate the user

apps/webview/src/hooks/useLocalStorage.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,14 @@ export function useLocalStorage<T> (keyName: string, defaultValue: T){
2929
console.log(`Error setting localStorage key "${keyName}":`, err);
3030
}
3131
};
32-
return [storedValue, setValue] as const;
32+
33+
const clearValue = () => {
34+
try {
35+
window.localStorage.removeItem(keyName);
36+
setStoredValue(defaultValue);
37+
} catch (err) {
38+
console.log(`Error clearing localStorage key "${keyName}":`, err);
39+
}
40+
}
41+
return [storedValue, setValue, clearValue] as const;
3342
};

apps/webview/src/index.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
/* ... */
6+
File renamed without changes.

0 commit comments

Comments
 (0)