Skip to content

Commit

Permalink
fix: redirect to marketplace
Browse files Browse the repository at this point in the history
  • Loading branch information
tranvanhai0504 committed Sep 14, 2024
1 parent 1c78570 commit e7c52dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/components/MobileDevice/homeMobile/HomeMobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import { MdOutlineShoppingCart } from "react-icons/md";
import PixelCustom from "../../buttons/PixelCustom";
import { FaRegClock } from "react-icons/fa";
import { FaKey } from "react-icons/fa";
import { Link, redirect } from "react-router-dom";
import { Link, useNavigate } from "react-router-dom";

const HomeMobile = () => {
const navigate = useNavigate();

return (
<div className="mx-auto flex h-full w-full max-w-screen-sm flex-col items-center px-8">
<div className="flex w-full flex-grow flex-col justify-center py-16 text-white">
Expand Down Expand Up @@ -37,7 +39,7 @@ const HomeMobile = () => {
<PixelCustom>
<button
className="w-32 bg-white text-2xl text-black"
onClick={() => redirect("/marketplace")}
onClick={() => navigate("/marketplace")}
>
Open
</button>
Expand Down
2 changes: 1 addition & 1 deletion src/components/MobileDevice/marketplace/Marketplace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Marketplace = () => {
return (
<div className="mx-auto flex h-[100vh] w-full max-w-screen-sm flex-col items-center pt-20 ">
<div className="w-full h-full bg-[#C48D5D] rounded-t-2xl p-10 text-white">
<div className=" text-xl" onClick={() => navigate("/")}>
<div className=" text-xl cursor-pointer" onClick={() => navigate("/")}>
Back
</div>
<h1 className="text-3xl text-center mb-5">Marketplace</h1>
Expand Down

0 comments on commit e7c52dd

Please sign in to comment.