How would I set up file-based routing with tanstack router so that I could have these three different routes:
- /{year} routes to YearViewComponent
- /{year}/{month} routes to MonthViewComponent
- /{year}/{month}/{day} routes to DayViewComponent
I've tried to accomplish the above by defining three file-based routes:
- $year.$month.$day.tsx
- $year.$month.tsx
- $year.tsx
However, the $year.tsx component is picking up all routes, instead of allowing $year.$month to handle /2025/12 for example. How can I get $year.$month.tsx to handle /2024/12 route and $year.$month.$day to handle /2024/12/24 route?