Skip to content

Commit bcc56e7

Browse files
committed
refactor: Reorder imports, add accommodation route, and adjust talk track filtering.
1 parent 1c0e99e commit bcc56e7

File tree

30 files changed

+87
-55
lines changed

30 files changed

+87
-55
lines changed

src/2023/Home/components/SpeakersCarousel/SpeakerSwiper.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1-
import type { FC } from "react";
2-
1+
import { styled } from "styled-components";
32
import { Autoplay, Parallax } from "swiper";
43
import { Swiper, SwiperSlide } from "swiper/react";
5-
import { styled } from "styled-components";
64

75
import { Color } from "@styles/colors";
86

7+
8+
import type { FC } from "react";
9+
10+
911
import "swiper/swiper-bundle.min.css";
10-
import { Link } from "react-router";
1112

1213
import { ROUTE_SPEAKER_DETAIL } from "@constants/routes";
1314
import { useFetchSpeakers } from "@hooks/useFetchSpeakers";
1415
import { useSentryErrorReport } from "@hooks/useSentryErrorReport";
1516

17+
import { Link } from "react-router";
18+
1619
const StyledSlideImage = styled.img`
1720
display: block;
1821
width: 100%;

src/2023/SessionFeedback/SessionFeedback2023.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ import type { MeasurableSessionRating, SessionRating } from "./sessionData";
22

33
import { sessionData } from "./sessionData";
44

5-
import React from "react";
6-
import { DataTable } from "primereact/datatable";
7-
import { Column } from "primereact/column";
8-
import { Rating } from "primereact/rating";
95
import "primereact/resources/primereact.min.css";
106
import "primereact/resources/themes/lara-light-blue/theme.css";
7+
8+
119
import { FilterMatchMode } from "primereact/api";
10+
import { Column } from "primereact/column";
11+
import { DataTable } from "primereact/datatable";
1212
import { InputText } from "primereact/inputtext";
13+
import { Rating } from "primereact/rating";
14+
import React from "react";
1315
import { Link } from "react-router";
1416

1517
import { ROUTE_TALK_DETAIL } from "@constants/routes";
@@ -40,11 +42,13 @@ export const SessionFeedback2023: FC<React.PropsWithChildren<unknown>> = () => {
4042
);
4143

4244
const [globalFilterValue, setGlobalFilterValue] = React.useState("");
43-
const [filters, setFilters] = React.useState({
45+
const [filters, setFilters] = React.useState<{
46+
global: { value: string | null; matchMode: FilterMatchMode };
47+
}>({
4448
global: { value: null, matchMode: FilterMatchMode.CONTAINS },
4549
});
4650

47-
const onGlobalFilterChange = (e: { target: { value: any } }) => {
51+
const onGlobalFilterChange = (e: React.ChangeEvent<HTMLInputElement>) => {
4852
const value = e.target.value;
4953
const _filters = { ...filters };
5054

src/2023/TalkDetail/TalkDetailContainer2023.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const StyledContainer = styled.div`
2222
`;
2323
const TalkDetailContainer2023: FC<React.PropsWithChildren<unknown>> = () => {
2424
const { id } = useParams<{ id: string }>();
25+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
2526
const { isLoading, error, data } = useFetchTalksById(id!, "2023");
2627
const { data: speakerData } = useFetchSpeakers("2023");
2728

src/2023/Talks/Talks2023.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import type { FC } from "react";
22

3-
import TitleSection from "@components/SectionTitle/TitleSection";
43

5-
import { Dropdown } from "primereact/dropdown";
6-
import React, { useEffect, useState } from "react";
4+
import TrackInformation from "@components/common/TrackInformation";
75

6+
import "@styles/theme.css";
7+
import { Dropdown } from "primereact/dropdown";
88
import "primereact/resources/primereact.min.css";
99
import "primereact/resources/themes/lara-light-indigo/theme.css";
10-
import "@styles/theme.css";
11-
import TrackInformation from "@components/common/TrackInformation";
10+
import React, { useEffect, useState } from "react";
11+
12+
import TitleSection from "@components/SectionTitle/TitleSection";
1213
import { SectionWrapper } from "@components/SectionWrapper/SectionWrapper";
1314
import conferenceData from "@data/2023.json";
1415
import { useFetchTalks } from "@hooks/useFetchTalks";
@@ -63,9 +64,9 @@ const Talks2023: FC<React.PropsWithChildren<unknown>> = () => {
6364
{ name: "All Tracks", code: undefined },
6465
...(data !== undefined
6566
? data.flatMap((group) => ({
66-
code: group.groupId.toString(),
67-
name: removeParenthesesContent(group.groupName),
68-
}))
67+
code: group.groupId.toString(),
68+
name: removeParenthesesContent(group.groupName),
69+
}))
6970
: []),
7071
];
7172

src/2024/SpeakersCarousel/SpeakerSwiper.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import type { FC } from "react";
22

33
import React from "react";
4+
import "swiper/swiper-bundle.min.css";
5+
6+
import { Link } from "react-router";
47
import { styled } from "styled-components";
58
import { Autoplay, Parallax } from "swiper";
69
import { Swiper, SwiperSlide } from "swiper/react";
7-
import "swiper/swiper-bundle.min.css";
8-
import { Link } from "react-router";
910

1011
import { ROUTE_SPEAKER_DETAIL } from "@constants/routes";
1112
import conferenceData from "@data/2024.json";

src/2024/TalkDetail/MeetingDetailContainer2024.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export const MeetingDetailContainer2024: FC<
2424
React.PropsWithChildren<unknown>
2525
> = () => {
2626
const { id } = useParams<{ id: string }>();
27+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
2728
const { isLoading, error, data } = useFetchTalksById(id!, "2024");
2829
const { data: speakerData } = useFetchSpeakers("2024");
2930

src/2025/Speakers/SpeakersWrapper2025.test.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { screen } from "@testing-library/react";
2-
import React from "react";
3-
import { describe, it, expect, vi, beforeEach } from "vitest";
4-
import { type MockedFunction } from "vitest";
2+
import { beforeEach, describe, expect, it, vi, type MockedFunction } from "vitest";
53

64
import { SpeakersWrapper2025 } from "./SpeakersWrapper2025";
75
import { useFetchSpeakers } from "../../hooks/useFetchSpeakers";

src/components/Navigation/NavigationData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import {
2+
ROUTE_2026_CFP,
23
ROUTE_2026_CODE_OF_CONDUCT,
34
ROUTE_2026_HOME,
45
ROUTE_2026_SPONSORSHIP,
56
ROUTE_2026_TRAVEL,
67
ROUTE_ABOUT_US,
7-
ROUTE_2026_CFP,
88
} from "@constants/routes";
99

1010
export interface NavigationItem {

src/components/Router/SuspenseRoute.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import React, { Suspense } from "react";
1+
import { Suspense } from "react";
22
import { Route } from "react-router";
33

44
import { Loading } from "@components/Loading/Loading";
55

6+
67
import type { FC, ReactElement } from "react";
78

89
interface SuspenseRouteProps {

src/components/Tag/Tag.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ const colorMap: ColorMap = {
5757
testing: Color.GRAY,
5858
};
5959

60+
61+
// eslint-disable-next-line react-refresh/only-export-components
6062
export const colorTagByText = (text: string): string => {
6163
const lowercaseText = text.toLowerCase();
6264
for (const [key, value] of Object.entries(colorMap)) {

0 commit comments

Comments
 (0)