Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jagnani73 committed Sep 2, 2024
1 parent 752f4e3 commit 1f97577
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
5 changes: 4 additions & 1 deletion packages/backend/services/ws.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
8 changes: 5 additions & 3 deletions packages/frontend/src/app/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -20,15 +21,16 @@ export default function Footer() {
if (!(isGamesListingPage || isLeaderboardPage || isProfilePage)) return <></>;

const profileImage = (
<div className="size-7 overflow-hidden rounded-full">
<img
<figure className="relative size-7 overflow-hidden rounded-full">
<Image
src={
user?.data.profile_photo ? user?.data.profile_photo : anonImage.src
}
fill
alt="Profile image"
className="size-full [image-rendering:pixelated]"
/>
</div>
</figure>
);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1f97577

Please sign in to comment.