diff --git a/src/routes/Calendar/List/Item/Item.less b/src/routes/Calendar/List/Item/Item.less index 4ce981807..aba6bba09 100644 --- a/src/routes/Calendar/List/Item/Item.less +++ b/src/routes/Calendar/List/Item/Item.less @@ -88,12 +88,6 @@ } } - &.past { - .body { - opacity: 0.5; - } - } - &.active { border-color: var(--primary-foreground-color); } diff --git a/src/routes/Calendar/List/Item/Item.tsx b/src/routes/Calendar/List/Item/Item.tsx index cc48d5197..70010b0f5 100644 --- a/src/routes/Calendar/List/Item/Item.tsx +++ b/src/routes/Calendar/List/Item/Item.tsx @@ -20,13 +20,10 @@ const Item = ({ selected, monthInfo, date, items, profile, onClick }: Props) => const ref = useRef(null); const { toDayMonth } = useCalendarDate(profile); - const [active, today, past] = useMemo(() => { - const active = date.day === selected?.day; - const today = date.day === monthInfo.today; - const past = date.day < (monthInfo.today ?? 1); - - return [active, today, past]; - }, [selected, monthInfo, date]); + const [active, today] = useMemo(() => [ + date.day === selected?.day, + date.day === monthInfo.today, + ], [selected, monthInfo, date]); const onItemClick = () => { onClick && onClick(date); @@ -42,7 +39,7 @@ const Item = ({ selected, monthInfo, date, items, profile, onClick }: Props) => return (
diff --git a/src/routes/Calendar/Table/Cell/Cell.less b/src/routes/Calendar/Table/Cell/Cell.less index 285117119..1d54855bc 100644 --- a/src/routes/Calendar/Table/Cell/Cell.less +++ b/src/routes/Calendar/Table/Cell/Cell.less @@ -124,12 +124,6 @@ } } - &.past { - .items { - opacity: 0.5; - } - } - &.active { border-color: var(--primary-foreground-color); } diff --git a/src/routes/Calendar/Table/Cell/Cell.tsx b/src/routes/Calendar/Table/Cell/Cell.tsx index 4fc5e86c8..b5e78464c 100644 --- a/src/routes/Calendar/Table/Cell/Cell.tsx +++ b/src/routes/Calendar/Table/Cell/Cell.tsx @@ -15,13 +15,10 @@ type Props = { }; const Cell = ({ selected, monthInfo, date, items, onClick }: Props) => { - const [active, today, past] = useMemo(() => { - const active = date.day === selected?.day; - const today = date.day === monthInfo.today; - const past = date.day < (monthInfo.today ?? 1); - - return [active, today, past]; - }, [selected, monthInfo, date]); + const [active, today] = useMemo(() => [ + date.day === selected?.day, + date.day === monthInfo.today, + ], [selected, monthInfo, date]); const onCellClick = () => { onClick && onClick(date); @@ -29,7 +26,7 @@ const Cell = ({ selected, monthInfo, date, items, onClick }: Props) => { return (