From 1f9757734a77f449521d3b2414b233f365322e21 Mon Sep 17 00:00:00 2001 From: Yashvardhan Jagnani Date: Mon, 2 Sep 2024 21:15:50 +0530 Subject: [PATCH] fix --- packages/backend/services/ws.service.ts | 5 ++++- packages/frontend/src/app/components/Footer.tsx | 8 +++++--- .../frontend/src/app/wallet/components/ConnectModal.tsx | 1 - 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/backend/services/ws.service.ts b/packages/backend/services/ws.service.ts index aec413c..3a44868 100644 --- a/packages/backend/services/ws.service.ts +++ b/packages/backend/services/ws.service.ts @@ -20,7 +20,10 @@ export class WSService { public static async init(server: Server) { this.ioConnection = new WSServer(server, { cors: { - origin: "*", + origin: [ + "http://localhost:3000", + "https://dewls-frontend.vercel.app", + ], methods: ["GET", "POST"], credentials: true, }, diff --git a/packages/frontend/src/app/components/Footer.tsx b/packages/frontend/src/app/components/Footer.tsx index 37a0294..dd1d490 100644 --- a/packages/frontend/src/app/components/Footer.tsx +++ b/packages/frontend/src/app/components/Footer.tsx @@ -7,6 +7,7 @@ import { usePathname } from "next/navigation"; import clsx from "clsx"; import { AnimatePresence, motion } from "framer-motion"; import { useWeb3AuthContext } from "@/utils/context/web3auth.context"; +import Image from "next/image"; export default function Footer() { const { user } = useWeb3AuthContext(); @@ -20,15 +21,16 @@ export default function Footer() { if (!(isGamesListingPage || isLeaderboardPage || isProfilePage)) return <>; const profileImage = ( -
- + Profile image -
+ ); return ( diff --git a/packages/frontend/src/app/wallet/components/ConnectModal.tsx b/packages/frontend/src/app/wallet/components/ConnectModal.tsx index 1afa71f..04d890e 100644 --- a/packages/frontend/src/app/wallet/components/ConnectModal.tsx +++ b/packages/frontend/src/app/wallet/components/ConnectModal.tsx @@ -74,7 +74,6 @@ export const ConnectModal: React.FC = () => { if (!authResponse) return; setLoggedIn(true); - localStorage.setItem("token", authResponse.token); setUser({ data: authResponse.user, token: authResponse.token }); } } catch (error) {