Skip to content

Commit

Permalink
refactor: remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jbj338033 committed Dec 10, 2024
1 parent d8ebd90 commit 6d8622a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 2 additions & 5 deletions src/components/home/SchoolActivityButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { AiFillRobot } from "react-icons/ai";
import { AnimatePresence } from "framer-motion";
import * as S from "./style";

// Types
interface Activity {
readonly id: string;
readonly name: string;
Expand All @@ -20,10 +19,8 @@ interface ActivityItemProps extends Omit<Activity, "id"> {
onClick?: () => void;
}

// Constants
const EMPHASIS_THRESHOLD = 0.9; // 90% for emphasis
const EMPHASIS_THRESHOLD = 0.9;

// Animation variants
const menuVariants = {
hidden: { opacity: 0, y: 20, scale: 0.95 },
visible: {
Expand Down Expand Up @@ -159,7 +156,7 @@ const SchoolActivityButton = () => {
};

window.addEventListener("scroll", handleScroll);
handleScroll(); // Initial check
handleScroll();

return () => window.removeEventListener("scroll", handleScroll);
}, []);
Expand Down
6 changes: 3 additions & 3 deletions src/components/home/SchoolActivityButton/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ export const ButtonWrapper = styled.div`
position: relative;
display: flex;
flex-direction: column;
align-items: flex-end; // 오른쪽 정렬로 변경
align-items: flex-end;
`;

export const EmphasisHint = styled(motion.div)`
position: absolute;
top: -48px;
right: 0; // 오른쪽 정렬로 변경
transform: none; // transform 제거
right: 0;
transform: none;
background: ${({ theme }) => theme.colors.primary.main};
color: ${({ theme }) => theme.colors.text.inverse};
padding: ${({ theme }) => `${theme.spacing.xs} ${theme.spacing.md}`};
Expand Down

0 comments on commit 6d8622a

Please sign in to comment.