Skip to content

Commit

Permalink
Merge pull request #462 from LikeLion-at-DGU/dev
Browse files Browse the repository at this point in the history
🚀
  • Loading branch information
Chaem03 authored Aug 6, 2024
2 parents 84479e3 + 3b126a5 commit 1bc921e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 50 deletions.
55 changes: 9 additions & 46 deletions src/components/common/Footer/Footer.jsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
import * as S from "./style";
import RandomImg from "../../../assets/DefaultRandom.svg";
import { useNavigate } from "react-router-dom";
import { useState } from "react";
export const Footer = () => {
const navigate = useNavigate();
const [activeItem, setActiveItem] = useState("");

const handleItemClick = (item) => {
setActiveItem(item);
navigate(item);
};

return (
<S.Layout>
<S.Container>
<S.ItemBox
onClick={() => handleItemClick("/")}
style={{
fill: activeItem === "/" ? "#78A1B5" : "#2A2A2A",
fillOpacity: "0.7",
}}
>
<S.ItemBox onClick={() => navigate("/")}>
<svg
xmlns="http://www.w3.org/2000/svg"
width="28"
Expand All @@ -30,19 +17,13 @@ export const Footer = () => {
>
<path
d="M12.2675 0.614363C12.7574 0.216913 13.3691 0 14 0C14.6309 0 15.2426 0.216913 15.7325 0.614363L26.221 9.11186C26.6979 9.49808 27.0827 9.98584 27.3472 10.5396C27.6117 11.0934 27.7493 11.6992 27.75 12.3129V24.7539C27.75 25.4832 27.4603 26.1827 26.9445 26.6984C26.4288 27.2141 25.7293 27.5039 25 27.5039H20.875C20.1457 27.5039 19.4462 27.2141 18.9305 26.6984C18.4147 26.1827 18.125 25.4832 18.125 24.7539V17.8789C18.125 17.5142 17.9801 17.1645 17.7223 16.9066C17.4644 16.6487 17.1147 16.5039 16.75 16.5039H11.25C10.8853 16.5039 10.5356 16.6487 10.2777 16.9066C10.0199 17.1645 9.875 17.5142 9.875 17.8789V24.7539C9.875 25.4832 9.58527 26.1827 9.06954 26.6984C8.55382 27.2141 7.85435 27.5039 7.125 27.5039H3C2.27065 27.5039 1.57118 27.2141 1.05546 26.6984C0.539731 26.1827 0.25 25.4832 0.25 24.7539V12.3156C0.249878 11.701 0.387104 11.0941 0.651645 10.5393C0.916187 9.98456 1.30136 9.49591 1.779 9.10911L12.2675 0.614363Z"
fill={activeItem === "/" ? "#78A1B5" : "#2A2A2A"}
fill="#2A2A2A"
fillOpacity="0.7"
/>
</svg>
<p></p>
</S.ItemBox>
<S.ItemBox
onClick={() => handleItemClick("/search")}
style={{
fill: activeItem === "/search" ? "#78A1B5" : "#2A2A2A",
fillOpacity: "0.7",
}}
>
<S.ItemBox onClick={() => navigate("/search")}>
<svg
xmlns="http://www.w3.org/2000/svg"
width="25"
Expand All @@ -54,28 +35,16 @@ export const Footer = () => {
fillRule="evenodd"
clipRule="evenodd"
d="M11.1201 0.50293C9.34671 0.503081 7.5991 0.927313 6.02305 1.74023C4.447 2.55315 3.0882 3.73118 2.06002 5.17605C1.03184 6.62091 0.364097 8.2907 0.112499 10.0461C-0.139099 11.8015 0.0327432 13.5917 0.61369 15.2672C1.19464 16.9426 2.16784 18.4549 3.45211 19.6778C4.73638 20.9007 6.29446 21.7987 7.99638 22.297C9.6983 22.7952 11.4947 22.8792 13.2357 22.542C14.9767 22.2048 16.6118 21.4562 18.0046 20.3585L22.7827 25.1366C23.0295 25.3749 23.36 25.5068 23.703 25.5038C24.0461 25.5008 24.3742 25.3632 24.6168 25.1207C24.8594 24.8781 24.997 24.5499 25 24.2069C25.0029 23.8638 24.8711 23.5334 24.6327 23.2866L19.8546 18.5085C21.1473 16.8686 21.9521 14.898 22.1771 12.822C22.402 10.7461 22.038 8.64876 21.1266 6.77006C20.2153 4.89136 18.7934 3.3072 17.0237 2.19886C15.2541 1.09052 13.2081 0.50279 11.1201 0.50293ZM2.61576 11.6239C2.61576 9.36845 3.51175 7.20535 5.10661 5.61049C6.70148 4.01562 8.86458 3.11964 11.1201 3.11964C13.3755 3.11964 15.5386 4.01562 17.1335 5.61049C18.7284 7.20535 19.6244 9.36845 19.6244 11.6239C19.6244 13.8794 18.7284 16.0425 17.1335 17.6374C15.5386 19.2322 13.3755 20.1282 11.1201 20.1282C8.86458 20.1282 6.70148 19.2322 5.10661 17.6374C3.51175 16.0425 2.61576 13.8794 2.61576 11.6239Z"
fill={activeItem === "/search" ? "#78A1B5" : "#2A2A2A"}
fill="#2A2A2A"
fillOpacity="0.7"
/>
</svg>
<p>검색</p>
</S.ItemBox>
<S.ItemBox
onClick={() => handleItemClick("/randomDice")}
style={{
fill: activeItem === "/randomDice" ? "#78A1B5" : "#2A2A2A",
fillOpacity: "0.7",
}}
>
<S.ItemBox onClick={() => navigate("/randomDice")}>
<img src={RandomImg} alt="" />
</S.ItemBox>
<S.ItemBox
onClick={() => handleItemClick("/calendar")}
style={{
fill: activeItem === "/calendar" ? "#78A1B5" : "#2A2A2A",
fillOpacity: "0.7",
}}
>
<S.ItemBox onClick={() => navigate("/calendar")}>
<svg
xmlns="http://www.w3.org/2000/svg"
width="26"
Expand All @@ -85,19 +54,13 @@ export const Footer = () => {
>
<path
d="M0.5 21.7538C0.5 23.8788 2.125 25.5038 4.25 25.5038H21.75C23.875 25.5038 25.5 23.8788 25.5 21.7538V11.7538H0.5V21.7538ZM21.75 3.00385H19.25V1.75385C19.25 1.00385 18.75 0.503845 18 0.503845C17.25 0.503845 16.75 1.00385 16.75 1.75385V3.00385H9.25V1.75385C9.25 1.00385 8.75 0.503845 8 0.503845C7.25 0.503845 6.75 1.00385 6.75 1.75385V3.00385H4.25C2.125 3.00385 0.5 4.62885 0.5 6.75385V9.25385H25.5V6.75385C25.5 4.62885 23.875 3.00385 21.75 3.00385Z"
fill={activeItem === "/calendar" ? "#78A1B5" : "#2A2A2A"}
fill="#2A2A2A"
fillOpacity="0.7"
/>
</svg>
<p>캘린더</p>
</S.ItemBox>
<S.ItemBox
onClick={() => handleItemClick("/mypage")}
style={{
fill: activeItem === "/mypage" ? "#78A1B5" : "#2A2A2A",
fillOpacity: "0.7",
}}
>
<S.ItemBox onClick={() => navigate("/mypage")}>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
Expand All @@ -107,7 +70,7 @@ export const Footer = () => {
>
<path
d="M11.9999 0.170532C13.547 0.170532 15.0307 0.785114 16.1247 1.87908C17.2187 2.97304 17.8333 4.45677 17.8333 6.00387C17.8333 7.55096 17.2187 9.03469 16.1247 10.1287C15.0307 11.2226 13.547 11.8372 11.9999 11.8372C10.4528 11.8372 8.96909 11.2226 7.87513 10.1287C6.78117 9.03469 6.16659 7.55096 6.16659 6.00387C6.16659 4.45677 6.78117 2.97304 7.87513 1.87908C8.96909 0.785114 10.4528 0.170532 11.9999 0.170532ZM11.9999 14.7539C18.4458 14.7539 23.6666 17.3643 23.6666 20.5872V23.5039H0.333252V20.5872C0.333252 17.3643 5.55409 14.7539 11.9999 14.7539Z"
fill={activeItem === "/mypage" ? "#78A1B5" : "#2A2A2A"}
fill="#2A2A2A"
fillOpacity="0.7"
/>
</svg>
Expand Down
3 changes: 0 additions & 3 deletions src/hooks/useStar.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import { useState, useEffect } from "react";
import { useParams } from "react-router-dom";
import { getStarContent } from "../apis/starP";
import { useSetRecoilState } from "recoil";
import { isLoading } from "@/stores/loading";

export const useMoveonStarP = () => {
const setLoading = useSetRecoilState(isLoading);
const [starP, setStarP] = useState(null);
const { id } = useParams();

Expand Down
2 changes: 1 addition & 1 deletion src/pages/Share/Share.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useRef, useState, useEffect } from "react";
import React, { useRef, useState } from "react";
import html2canvas from "html2canvas";
import { captureScreenshot } from "@/utils/share";
import * as S from "./styled";
Expand Down

0 comments on commit 1bc921e

Please sign in to comment.