fix: resolve ESLint errors blocking Docker build
All checks were successful
Build and Deploy / Build & Push (push) Successful in 2m45s
All checks were successful
Build and Deploy / Build & Push (push) Successful in 2m45s
- Remove unused formatDate() from park page (replaced by formatShortDate) - Remove unused date prop from DayCell component - Change let to const for cellBorderRadius in ParkCard - Change let to const for bg in ParkMonthCalendar Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -121,12 +121,6 @@ export default async function ParkPage({ params, searchParams }: PageProps) {
|
|||||||
|
|
||||||
// ── Helpers ────────────────────────────────────────────────────────────────
|
// ── Helpers ────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
function formatDate(iso: string): string {
|
|
||||||
return new Date(iso + "T00:00:00").toLocaleDateString("en-US", {
|
|
||||||
weekday: "long", month: "long", day: "numeric",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function formatShortDate(iso: string): string {
|
function formatShortDate(iso: string): string {
|
||||||
return new Date(iso + "T00:00:00").toLocaleDateString("en-US", {
|
return new Date(iso + "T00:00:00").toLocaleDateString("en-US", {
|
||||||
weekday: "short", month: "short", day: "numeric",
|
weekday: "short", month: "short", day: "numeric",
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export function ParkCard({ park, weekDates, parkData, today }: ParkCardProps) {
|
|||||||
|
|
||||||
let cellBg = "transparent";
|
let cellBg = "transparent";
|
||||||
let cellBorder = "1px solid var(--color-border-subtle)";
|
let cellBorder = "1px solid var(--color-border-subtle)";
|
||||||
let cellBorderRadius = "6px";
|
const cellBorderRadius = "6px";
|
||||||
|
|
||||||
if (isToday) {
|
if (isToday) {
|
||||||
cellBg = "var(--color-today-bg)";
|
cellBg = "var(--color-today-bg)";
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ export function ParkMonthCalendar({ parkId, year, month, monthData, today }: Par
|
|||||||
const isOpen = dayData?.isOpen && dayData?.hoursLabel;
|
const isOpen = dayData?.isOpen && dayData?.hoursLabel;
|
||||||
const isPH = dayData?.specialType === "passholder_preview";
|
const isPH = dayData?.specialType === "passholder_preview";
|
||||||
|
|
||||||
let bg = isToday
|
const bg = isToday
|
||||||
? "var(--color-today-bg)"
|
? "var(--color-today-bg)"
|
||||||
: isWeekend
|
: isWeekend
|
||||||
? "var(--color-weekend-header)"
|
? "var(--color-weekend-header)"
|
||||||
|
|||||||
@@ -28,12 +28,10 @@ function parseDate(iso: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function DayCell({
|
function DayCell({
|
||||||
date,
|
|
||||||
dayData,
|
dayData,
|
||||||
isToday,
|
isToday,
|
||||||
isWeekend,
|
isWeekend,
|
||||||
}: {
|
}: {
|
||||||
date: string;
|
|
||||||
dayData: DayData | undefined;
|
dayData: DayData | undefined;
|
||||||
isToday: boolean;
|
isToday: boolean;
|
||||||
isWeekend: boolean;
|
isWeekend: boolean;
|
||||||
@@ -214,7 +212,6 @@ function ParkRow({
|
|||||||
{weekDates.map((date, i) => (
|
{weekDates.map((date, i) => (
|
||||||
<DayCell
|
<DayCell
|
||||||
key={date}
|
key={date}
|
||||||
date={date}
|
|
||||||
dayData={parkData[date]}
|
dayData={parkData[date]}
|
||||||
isToday={date === today}
|
isToday={date === today}
|
||||||
isWeekend={parsedDates[i].isWeekend}
|
isWeekend={parsedDates[i].isWeekend}
|
||||||
|
|||||||
Reference in New Issue
Block a user