Skip to content

Commit

Permalink
fix: change home path
Browse files Browse the repository at this point in the history
  • Loading branch information
2paperstar committed Feb 15, 2024
1 parent ffe5822 commit efc0b59
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 37 deletions.
89 changes: 54 additions & 35 deletions src/pages/component/Menu.tsx
Original file line number Diff line number Diff line change
@@ -1,41 +1,60 @@
import React, { useState } from 'react';
import React from 'react';
import { FiHome } from 'react-icons/fi';
import { GoPerson } from 'react-icons/go';
import { GrMap } from 'react-icons/gr';
import { LuPlayCircle } from 'react-icons/lu';
import { Link } from 'react-router-dom';
import { FiHome } from "react-icons/fi";
import { GrMap } from "react-icons/gr";
import { LuPlayCircle } from "react-icons/lu";
import { GoPerson } from "react-icons/go";

type MenuProps = {
home?: boolean;
map?: boolean;
video?: boolean;
mypage?: boolean;
}
home?: boolean;
map?: boolean;
video?: boolean;
mypage?: boolean;
};

const Menu: React.FC<MenuProps> = ({home, map, video, mypage}) => {


return (
<div className={`max-w-screen-sm w-[100%] h-[60px] bottom-0 left-50% z-30 fixed flex justify-between items-center border-t border-[#E5E5E5] bg-white`}>
<Link to="/Home" className={`flex flex-col items-center justify-center text-sm w-[25%] h-[60px] text-[#000000] ${home ? 'text-[#000000]' : 'text-[#828282]'}`}>
<FiHome className='text-xl' />
<p></p>
</Link>
<Link to="/Map" className={`flex flex-col items-center justify-center text-sm w-[25%] h-[60px] ${map ? 'text-[#000000]' : 'text-[#828282]'}`}>
<GrMap className='text-xl' />
<p>지도</p>
</Link>
<Link to="/Videos" className={`flex flex-col items-center justify-center text-sm w-[25%] h-[60px] ${video ? 'text-[#000000]' : 'text-[#828282]'}`}>
<LuPlayCircle className='text-xl' />
<p>탐색</p>
</Link>
<Link to="/Mypage" className={`flex flex-col items-center justify-center text-sm w-[25%] h-[60px] ${mypage ? 'text-[#000000]' : 'text-[#828282]'}`}>
<GoPerson className='text-xl' />
<p>마이페이지</p>
</Link>

</div>
);
}
const Menu: React.FC<MenuProps> = ({ home, map, video, mypage }) => {
return (
<div
className={`max-w-screen-sm w-[100%] h-[60px] bottom-0 left-50% z-30 fixed flex justify-between items-center border-t border-[#E5E5E5] bg-white`}
>
<Link
to="/home"
className={`flex flex-col items-center justify-center text-sm w-[25%] h-[60px] text-[#000000] ${
home ? 'text-[#000000]' : 'text-[#828282]'
}`}
>
<FiHome className="text-xl" />
<p></p>
</Link>
<Link
to="/Map"
className={`flex flex-col items-center justify-center text-sm w-[25%] h-[60px] ${
map ? 'text-[#000000]' : 'text-[#828282]'
}`}
>
<GrMap className="text-xl" />
<p>지도</p>
</Link>
<Link
to="/Videos"
className={`flex flex-col items-center justify-center text-sm w-[25%] h-[60px] ${
video ? 'text-[#000000]' : 'text-[#828282]'
}`}
>
<LuPlayCircle className="text-xl" />
<p>탐색</p>
</Link>
<Link
to="/Mypage"
className={`flex flex-col items-center justify-center text-sm w-[25%] h-[60px] ${
mypage ? 'text-[#000000]' : 'text-[#828282]'
}`}
>
<GoPerson className="text-xl" />
<p>마이페이지</p>
</Link>
</div>
);
};

export default Menu;
4 changes: 2 additions & 2 deletions src/routes/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ const Router = () => {
<Routes>
{user ? (
<>
<Route path="/Home" element={<Home />} />
<Route path="/home" element={<Home />} />
<Route path="/Alarm" element={<Alarm />} />
<Route path="/SearchPerson" element={<SearchPerson />} />
<Route path="/SearchPlace" element={<SearchPlace />} />
<Route path="/Store" element={<Store />} />
<Route path="/Videos" element={<Videos />} />
<Route path="*" element={<Navigate to="/Home" />} />
<Route path="*" element={<Navigate to="/home" />} />
</>
) : (
<>
Expand Down

0 comments on commit efc0b59

Please sign in to comment.