diff --git a/src/app/results/RaceResults.tsx b/src/app/(features)/RaceSchedule.tsx
similarity index 81%
rename from src/app/results/RaceResults.tsx
rename to src/app/(features)/RaceSchedule.tsx
index ea7aec7..db2971e 100644
--- a/src/app/results/RaceResults.tsx
+++ b/src/app/(features)/RaceSchedule.tsx
@@ -4,6 +4,57 @@ import { useMemo } from 'react';
import { seasonRacesAtom } from '@/atoms/races';
+export const RaceSchedule = () => {
+ const [races] = useAtom(seasonRacesAtom);
+
+ const winterTesting = useMemo(
+ () => races.find((race) => race.EventFormat === 'testing'),
+ [races],
+ );
+ const mainEvents = useMemo(
+ () => races.filter((race) => race.EventFormat !== 'testing'),
+ [races],
+ );
+
+ if (races.length === 0)
+ return (
+
+ {/* If seasonAom === current/upcomming season, then add button to bring user to next event */}
+ {winterTesting &&
}
+
+ {/* 10 Placeholder Cards */}
+ {mainEvents.map((race) => (
+
+ ))}
+
+
+ );
+};
+
+const SkeletonResultCard = () => (
+
- {/* If seasonAom === current/upcomming season, then add button to bring user to next event */}
- {winterTesting &&
}
-
- {/* 10 Placeholder Cards */}
- {mainEvents.map((race) => (
-
- ))}
-
-
- );
-};
diff --git a/src/app/(features)/RaceTimeline.tsx b/src/app/(features)/RaceTimeline.tsx
index 7d55857..b45cba5 100644
--- a/src/app/(features)/RaceTimeline.tsx
+++ b/src/app/(features)/RaceTimeline.tsx
@@ -40,7 +40,9 @@ export const DriverResultsInfo = ({
{!subEl && (
+
{children}
diff --git a/src/app/ui/Dropdown.tsx b/src/app/ui/Dropdown.tsx
index 61f1217..ffbbb21 100644
--- a/src/app/ui/Dropdown.tsx
+++ b/src/app/ui/Dropdown.tsx
@@ -24,7 +24,7 @@ export const Dropdown = ({ value, items, action }: IDropdown) => {
role='button'
className={clsx(
{ 'pointer-events-none opacity-50': items.length <= 0 },
- 'btn btn-ghost btn-sm rounded-btn px-0 underline',
+ 'btn btn-ghost btn-sm rounded-btn underline',
)}
>
{value} {items.length > 0 &&
}
diff --git a/src/app/ui/MainFilters.tsx b/src/app/ui/MainFilters.tsx
index 749f2f8..9501a58 100644
--- a/src/app/ui/MainFilters.tsx
+++ b/src/app/ui/MainFilters.tsx
@@ -16,11 +16,7 @@ import {
raceAtom,
seasonRacesAtom,
} from '@/atoms/races';
-import {
- handleMainFilterSubmit,
- telemetryDisableAtom,
- toggleTelemetryDisableAtom,
-} from '@/atoms/results';
+import { handleMainFilterSubmit, telemetryDisableAtom } from '@/atoms/results';
import {
allSeasonsAtom,
fetchSeasons,
@@ -29,7 +25,6 @@ import {
} from '@/atoms/seasons';
import {
allSessionsAtom,
- fetchSessionResults,
handleSessionChangeAtom,
sessionAtom,
} from '@/atoms/sessions';
@@ -45,12 +40,11 @@ export const MainFilters = () => {
const pathname = usePathname();
const [telemetryDisable] = useAtom(telemetryDisableAtom);
- // const [resultsUrl] = useAtom(resultUrlAtom);
const [, handleResultsSubmit] = useAtom(handleMainFilterSubmit);
- useAtom(toggleTelemetryDisableAtom);
- useAtom(fetchSeasons);
- useAtom(fetchSessionResults);
+ // useAtom(fetchSeasons);
+ // useAtom(toggleTelemetryDisableAtom);
+ // useAtom(fetchSessionResults);
const changePath = (url: string) => {
// If not home page auto change page
@@ -59,7 +53,7 @@ export const MainFilters = () => {
const handleSubmit = () => {
const url = handleResultsSubmit();
- router.push(url);
+ router.push('/' + url);
};
return (
@@ -75,7 +69,7 @@ export const MainFilters = () => {
-