Skip to content

Commit

Permalink
refactor: 메서드명 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
MinGu-Jeong committed Apr 5, 2024
1 parent 5a04368 commit 2360b6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/page/Coop/components/SoldoutToggle/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import styles from './SoldoutToggle.module.scss';
export default function SoldoutToggle() {
const [isActive, setIsActive] = useState(true);

const toggleButton = () => {
const handleToggle = () => {
setIsActive(!isActive);
};

return (
<svg className={styles['toggle-button']} onClick={toggleButton} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 46 23">
<svg className={styles['toggle-button']} onClick={handleToggle} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 46 23">
<rect className={styles.background} x="1.5" y="2" width="43" height="19" fill={isActive ? '#E1E1E1' : '#175C8E'} stroke="#F5F5F5" />
<circle className={styles.circle} cx={isActive ? 11 : 35} cy="11.5" />
</svg>
Expand Down

0 comments on commit 2360b6e

Please sign in to comment.