Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
PhorDotC committed Jul 24, 2024
1 parent 2ddca7a commit 75fc890
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
4 changes: 1 addition & 3 deletions src/app/(main)/home/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function Home() {
'first-date' | 'rup-peun'
>('first-date');
const [joinModal, setJoinModal] = useState<boolean>(false);
const [announce, setAnnounce] = useState<boolean>(false);
//const [announce, setAnnounce] = useState<boolean>(false);
const [isCheckedIn, setIsCheckedIn] = useState<boolean>(false);
const [isJoined, setIsJoined] = useState<boolean>(false);

Expand Down Expand Up @@ -157,7 +157,6 @@ export default function Home() {
setEvent={setInterestedEvent}
isCheckedIn={isCheckedIn}
setJoinModal={setJoinModal}
setAnnounce={setAnnounce}
>
<div>Rub Peun Kao Mai 2024</div>
</CustomButton>
Expand Down Expand Up @@ -218,7 +217,6 @@ export default function Home() {
<JoinModal
modal={joinModal}
setModal={setJoinModal}
announce={announce}
isJoined={isJoined}
checkInConfirm={checkInConfirm}
/>
Expand Down
4 changes: 1 addition & 3 deletions src/components/(main)/home/CustomButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ interface CustomButtonProps {
setWaitModal?: (value: boolean) => void;
setEvent?: (value: 'first-date' | 'rup-peun') => void;
setJoinModal?: (value: boolean) => void;
setAnnounce?: (value: boolean) => void;
}

const CustomButton: React.FC<CustomButtonProps> = ({
Expand All @@ -27,7 +26,6 @@ const CustomButton: React.FC<CustomButtonProps> = ({
setWaitModal,
setEvent,
setJoinModal,
setAnnounce,
}) => {
const router = useRouter();
const { isConfirmed } = useBaan();
Expand Down Expand Up @@ -72,7 +70,7 @@ const CustomButton: React.FC<CustomButtonProps> = ({
if (currentDate >= closedSelectionDate) {
if (!isConfirmed) {
router.push('/rpkm/activities/home');
} else if (setJoinModal && setAnnounce) {
} else if (setJoinModal) {
if (isCheckedIn) {
router.push('/rpkm/activities/home');
} else {
Expand Down
2 changes: 0 additions & 2 deletions src/components/(main)/home/JoinModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ import modalStyles from '@/components/rpkm/Modal/ModalStyle';
interface JoinModalProps {
modal: boolean;
setModal: (value: boolean) => void;
announce: boolean;
isJoined: boolean;
checkInConfirm: () => void;
}

const JoinModal: React.FC<JoinModalProps> = ({
modal,
setModal,
announce,
isJoined,
checkInConfirm,
}) => {
Expand Down

0 comments on commit 75fc890

Please sign in to comment.