Merge branch 'release/1.5.0'

This commit is contained in:
2024-02-01 15:36:40 +01:00
2 changed files with 5 additions and 4 deletions

View File

@@ -18,8 +18,9 @@ export const MonthCard:FC<MonthCardProps> = ({ yearMonth, children, monthlyExpen
const router = useRouter();
const elRef = useRef<HTMLDivElement>(null);
// setting the `month` will activate the accordion belonging to that month
const handleChange = (event:any) => router.push(`/?year=${yearMonth.year}&month=${yearMonth.month}`);
// Setting the `month` will activate the accordion belonging to that month
// If the accordion is already active, it will collapse it
const handleChange = (event:any) => router.push(expanded ? `/?year=${yearMonth.year}` : `/?year=${yearMonth.year}&month=${yearMonth.month}`);
useEffect(() => {
if(expanded && elRef.current) {
@@ -30,7 +31,7 @@ export const MonthCard:FC<MonthCardProps> = ({ yearMonth, children, monthlyExpen
return(
<div className="collapse collapse-plus bg-base-200 my-1" ref={elRef}>
<input type="radio" name="my-accordion-3" checked={expanded} onChange={handleChange} />
<input type="checkbox" name="my-accordion-3" checked={expanded} onChange={handleChange} />
<div className="collapse-title text-xl font-medium">
{`${formatYearMonth(yearMonth)}`}
{

View File

@@ -9,7 +9,7 @@ networks:
services:
web-app:
image: utility-bills-tracker:1.4.0
image: utility-bills-tracker:1.5.0
networks:
- traefik-network
- mongo-network