Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasKeskinn committed Sep 9, 2024
1 parent f624dd4 commit e1b3697
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/(auth)/sign-up/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import Lottie from "lottie-react";
import logo from "../../../public/logo.json";
import SignUpForm from "@/components/shared/common/Forms/SignUpForm";
import { firebaseAuth } from "@/utils/FirebaseConfig";
import { useRouter } from "next/navigation";
import { useEffect } from "react";
import { useRouter } from "next/navigation";

const SignUp = () => {
const router = useRouter();
const router = useRouter;
const currentUser = firebaseAuth.currentUser;
useEffect(() => {
if (!currentUser) {
Expand Down
12 changes: 9 additions & 3 deletions components/shared/photo/AvatarEdit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@ const AvatarEdit = ({ imgURL, setImgURL }) => {
const imageRef = useRef(null);
const [open, setOpen] = useState(false);
const { handleImageChange } = usePrevImg(imgURL, setImgURL);
const [isMobileDevice, setIsMobileDevice] = useState(false);

const isMobileDevice = /Mobi|Android|iPhone|iPad|iPod/i.test(
navigator.userAgent
);
useEffect(() => {
if (typeof window !== "undefined" && typeof navigator !== "undefined") {
const isMobile = /Mobi|Android|iPhone|iPad|iPod/i.test(
navigator.userAgent
);
setIsMobileDevice(isMobile);
}
}, []);

const handleOpen = () => setOpen(true);

Expand Down

0 comments on commit e1b3697

Please sign in to comment.