Merge pull request 'fix(frontend): hide calendar popups on empty dates' (#25) from fix/calendar-hide-popover-empty-days into main
CI / build-and-test (push) Has been cancelled

Reviewed-on: #25
This commit was merged in pull request #25.
This commit is contained in:
admin committed 2026-04-13 19:59:16 +00:00
commit 7b0267f9ac
3 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "calendar-run-frontend",
"version": "0.4.2",
"version": "0.4.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "calendar-run-frontend",
"version": "0.4.2",
"version": "0.4.3",
"dependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "calendar-run-frontend",
"private": true,
"version": "0.4.2",
"version": "0.4.3",
"type": "module",
"scripts": {
"dev": "vite",
+4 -4
View File
@@ -120,7 +120,7 @@ function CalendarMonthBlock(props: {
className={`races-cal__cell${hasRaces ? " races-cal__cell--has-race" : ""}${isOpen ? " races-cal__cell--open" : ""}`}
onMouseEnter={() => {
cancelClose();
setOpenYmd(ymd);
setOpenYmd(hasRaces ? ymd : null);
}}
onMouseLeave={scheduleClose}
>
@@ -132,7 +132,7 @@ function CalendarMonthBlock(props: {
}}
onFocus={() => {
cancelClose();
setOpenYmd(ymd);
setOpenYmd(hasRaces ? ymd : null);
}}
onBlur={(e) => {
const next = e.relatedTarget as Node | null;
@@ -144,7 +144,7 @@ function CalendarMonthBlock(props: {
>
{day}
</button>
{isOpen ? (
{isOpen && hasRaces ? (
<DayPopover
ymd={ymd}
races={dayRaces}
@@ -187,7 +187,7 @@ export function RacesCalendar(props: RacesCalendarProps): JSX.Element {
return (
<div className="races-cal">
<p className="races-cal__hint">Наведите на дату — краткая информация. Клик — страница дня.</p>
<p className="races-cal__hint">Наведите на дату с забегом — краткая информация. Клик — страница дня.</p>
{focusedMonthIndex === null || Number.isNaN(focusedMonthIndex) ? (
<div className="races-cal__year">
{MONTH_NAMES_RU_SHORT.map((_, mi) => (