diff --git a/src/2023/Talks/Talks2023.tsx b/src/2023/Talks/Talks2023.tsx index 7b9698ec2..d34f76b0c 100644 --- a/src/2023/Talks/Talks2023.tsx +++ b/src/2023/Talks/Talks2023.tsx @@ -1,10 +1,10 @@ import React, { FC, useEffect, useState } from "react"; -import LessThanDarkBlueIcon from "../../assets/images/LessThanDarkBlueIcon.svg"; -import MoreThanBlueIcon from "../../assets/images/MoreThanBlueIcon.svg"; -import SectionWrapper from "../../components/SectionWrapper/SectionWrapper"; -import TitleSection from "../../components/SectionTitle/TitleSection"; -import { Color } from "../../styles/colors"; -import conferenceData from "../../data/2023.json"; +import LessThanDarkBlueIcon from "@assets/images/LessThanDarkBlueIcon.svg"; +import MoreThanBlueIcon from "@assets/images/MoreThanBlueIcon.svg"; +import SectionWrapper from "@components/SectionWrapper/SectionWrapper"; +import TitleSection from "@components/SectionTitle/TitleSection"; +import { Color } from "@styles/colors"; +import conferenceData from "@data/2023.json"; import { StyledMarginBottom, StyledSpeakersSection, @@ -12,13 +12,13 @@ import { StyledTitleIcon, StyledWaveContainer, } from "./Talks.style"; -import { useFetchTalks } from "../../hooks/useFetchTalks"; +import { useFetchTalks } from "@hooks/useFetchTalks"; import { Dropdown, DropdownChangeEvent } from "primereact/dropdown"; import "primereact/resources/primereact.min.css"; import "primereact/resources/themes/lara-light-indigo/theme.css"; -import "../../styles/theme.css"; -import TrackInformation from "../../components/common/TrackInformation"; -import { useSentryErrorReport } from "../../hooks/useSentryErrorReport"; +import "@styles/theme.css"; +import TrackInformation from "@components/common/TrackInformation"; +import { useSentryErrorReport } from "@hooks/useSentryErrorReport"; interface TrackInfo { name: string; @@ -51,7 +51,7 @@ const Talks2023: FC> = () => { // Helper function to remove text between parentheses const removeParenthesesContent = (text: string): string => { - return text.replace(/\s*\([^)]*\)/g, ''); + return text.replace(/\s*\([^)]*\)/g, ""); }; const dropDownOptions = [ @@ -133,6 +133,7 @@ const Talks2023: FC> = () => { key={track.groupId} track={track} year={conferenceData.edition} + openFeedbackId={conferenceData.openFeedbackId} /> ))} diff --git a/src/2024/Talks/Talks2024.tsx b/src/2024/Talks/Talks2024.tsx index b8ec42c7d..63ca41b93 100644 --- a/src/2024/Talks/Talks2024.tsx +++ b/src/2024/Talks/Talks2024.tsx @@ -1,25 +1,25 @@ import React, { FC, useEffect, useState } from "react"; -import LessThanDarkBlueIcon from "../../assets/images/LessThanDarkBlueIcon.svg"; -import MoreThanBlueIcon from "../../assets/images/MoreThanBlueIcon.svg"; -import SectionWrapper from "../../components/SectionWrapper/SectionWrapper"; -import TitleSection from "../../components/SectionTitle/TitleSection"; -import { Color } from "../../styles/colors"; -import conferenceData from "../../data/2024.json"; +import LessThanDarkBlueIcon from "@assets/images/LessThanDarkBlueIcon.svg"; +import MoreThanBlueIcon from "@assets/images/MoreThanBlueIcon.svg"; +import SectionWrapper from "@components/SectionWrapper/SectionWrapper"; +import TitleSection from "@components/SectionTitle/TitleSection"; +import { Color } from "@styles/colors"; +import conferenceData from "@data/2024.json"; -import { useFetchTalks } from "../../hooks/useFetchTalks"; +import { useFetchTalks } from "@hooks/useFetchTalks"; import { Dropdown, DropdownChangeEvent } from "primereact/dropdown"; import "primereact/resources/primereact.min.css"; import "primereact/resources/themes/lara-light-indigo/theme.css"; -import "../../styles/theme.css"; +import "@styles/theme.css"; import { StyledMarginBottom, StyledSpeakersSection, StyledTitleContainer, StyledTitleIcon, StyledWaveContainer, -} from "../../views/Talks/Talks.style"; -import TrackInformation from "../../components/common/TrackInformation"; -import { useSentryErrorReport } from "../../hooks/useSentryErrorReport"; +} from "@views/Talks/Talks.style"; +import TrackInformation from "@components/common/TrackInformation"; +import { useSentryErrorReport } from "@hooks/useSentryErrorReport"; interface TrackInfo { name: string; @@ -52,7 +52,7 @@ const Talks2024: FC> = () => { // Helper function to remove text between parentheses const removeParenthesesContent = (text: string): string => { - return text.replace(/\s*\([^)]*\)/g, ''); + return text.replace(/\s*\([^)]*\)/g, ""); }; const dropDownOptions = [ @@ -135,6 +135,7 @@ const Talks2024: FC> = () => { key={track.groupId} track={track} year={conferenceData.edition} + openFeedbackId={conferenceData.openFeedbackId} /> ))} diff --git a/src/components/Talk/TalkCard.tsx b/src/components/Talk/TalkCard.tsx index 9c4f92d8f..54039f799 100644 --- a/src/components/Talk/TalkCard.tsx +++ b/src/components/Talk/TalkCard.tsx @@ -1,5 +1,5 @@ import React from "react"; -import CommonTalkCard, { TalkCardProps } from "../common/TalkCard"; +import { TalkCard as CommonTalkCard, TalkCardProps } from "../common/TalkCard"; export type { TalkCardProps }; diff --git a/src/components/common/TalkCard.tsx b/src/components/common/TalkCard.tsx index 1462cab7b..831ff27c1 100644 --- a/src/components/common/TalkCard.tsx +++ b/src/components/common/TalkCard.tsx @@ -8,8 +8,8 @@ import { ROUTE_2024_TALK_DETAIL, ROUTE_SPEAKER_DETAIL, ROUTE_TALK_DETAIL, -} from "../../constants/routes"; -import { Color } from "../../styles/colors"; +} from "@constants/routes"; +import { Color } from "@styles/colors"; import { StyledJobsInfo } from "../JobOffers/JobsCard"; import { StyledSessionCard, @@ -17,18 +17,18 @@ import { StyledTagsWrapper, StyledTalkSpeaker, StyledTalkTitle, -} from "../../views/Talks/Talks.style"; -import { StyledVoteTalkLink } from "../../views/MeetingDetail/MeetingDetail"; +} from "@views/Talks/Talks.style"; +import { StyledVoteTalkLink } from "@views/MeetingDetail/MeetingDetail"; import { extractSessionCategoryInfo, extractSessionTags, -} from "../../services/sessionsAdapter"; +} from "@services/sessionsAdapter"; import { CategoryItemEnum, QuestionAnswers, SessionCategory, SessionSpeaker, -} from "../../types/sessions"; +} from "@types/sessions"; export interface TalkCardProps { talk: { @@ -43,6 +43,7 @@ export interface TalkCardProps { categories: SessionCategory[]; questionAnswers: QuestionAnswers[]; }; + openFeedbackId: string; year: string; showTrack?: boolean; } @@ -73,6 +74,7 @@ export const TalkCard: FC> = ({ showTrack = false, talk, year, + openFeedbackId, }) => { return ( @@ -110,9 +112,9 @@ export const TalkCard: FC> = ({ return ; })} -
+
@@ -123,5 +125,3 @@ export const TalkCard: FC> = ({ ); }; - -export default TalkCard; diff --git a/src/components/common/TrackInformation.tsx b/src/components/common/TrackInformation.tsx index d5fa2a7b0..f5371316e 100644 --- a/src/components/common/TrackInformation.tsx +++ b/src/components/common/TrackInformation.tsx @@ -1,15 +1,16 @@ import React, { FC, useMemo } from "react"; -import TalkCard from "./TalkCard"; +import { TalkCard } from "./TalkCard"; import { StyledSessionSection, StyledTrackInfo, -} from "../../views/Talks/Talks.style"; +} from "@views/Talks/Talks.style"; -import { IGroup } from "../../types/sessions"; +import { IGroup } from "@types/sessions"; interface TrackInfoProps { track: IGroup; year: string; + openFeedbackId: string; } const useGenerateAnchorName = (trackName: string) => { @@ -24,6 +25,7 @@ const useGenerateAnchorName = (trackName: string) => { const TrackInformation: FC> = ({ track, year, + openFeedbackId, }) => { const anchorName = useGenerateAnchorName(track.groupName); @@ -33,11 +35,16 @@ const TrackInformation: FC> = ({ {Array.isArray(track.sessions) && track.sessions.map((session) => ( - + ))} ); }; -export default React.memo(TrackInformation); \ No newline at end of file +export default React.memo(TrackInformation); diff --git a/src/data/2023.json b/src/data/2023.json index d59e4940a..db97002ff 100644 --- a/src/data/2023.json +++ b/src/data/2023.json @@ -21,6 +21,7 @@ "enabled": true }, "linkedin": "https://www.linkedin.com/company/devbcn", + "openFeedbackId": "devbcn-2023", "schedule": { "enabled": true }, diff --git a/src/data/2024.json b/src/data/2024.json index 714eb6daa..cc717b313 100644 --- a/src/data/2024.json +++ b/src/data/2024.json @@ -22,6 +22,7 @@ "enabled": true }, "linkedin": "https://www.linkedin.com/company/devbcn", + "openFeedbackId": "devbcn24", "bluesky": "https://bsky.app/profile/devbcn.bsky.social", "schedule": { "enabled": true diff --git a/src/data/2025.json b/src/data/2025.json index ee304fcb9..b50368d95 100644 --- a/src/data/2025.json +++ b/src/data/2025.json @@ -21,6 +21,7 @@ "enabled": true }, "linkedin": "https://www.linkedin.com/company/devbcn", + "openFeedbackId": "TG4hBcL7iPtV2LecVdHu", "schedule": { "enabled": true }, diff --git a/src/types/sessions.ts b/src/types/sessions.ts index 08fae8d8b..0c3ec70ef 100644 --- a/src/types/sessions.ts +++ b/src/types/sessions.ts @@ -1,89 +1,90 @@ -import {ISpeaker} from "./speakers"; +import { ISpeaker } from "./speakers"; export interface SessionSpeaker { - readonly id: string; - readonly name: string; + readonly id: string; + readonly name: string; } export enum CategoryItemEnum { - Language = "Language", - Track = "Track", - Format = "Session format", - Level = "Level", + Language = "Language", + Track = "Track", + Format = "Session format", + Level = "Level", } interface CategoryItem { - readonly id: number; - readonly name: string; + readonly id: number; + readonly name: string; } export interface SessionCategory { - readonly id: number; - readonly name: CategoryItemEnum; - readonly categoryItems: CategoryItem[]; + readonly id: number; + readonly name: CategoryItemEnum; + readonly categoryItems: CategoryItem[]; } export interface Session { - readonly id: number; - readonly title: string; - readonly description: string; - readonly startsAt: string; - readonly endsAt: string; - readonly slidesURL?: string; - readonly speakers: SessionSpeaker[]; - readonly categories: SessionCategory[]; - readonly questionAnswers: QuestionAnswers[]; - readonly recordingUrl?: string; - readonly track: string; + readonly id: number; + readonly title: string; + readonly description: string; + readonly startsAt: string; + readonly endsAt: string; + readonly slidesURL?: string; + readonly speakers: SessionSpeaker[]; + readonly categories: SessionCategory[]; + readonly questionAnswers: QuestionAnswers[]; + readonly recordingUrl?: string; + readonly track: string; } export interface IGroup { - readonly groupId: number; - readonly groupName: string; - readonly sessions: Session[]; - readonly isDefault: boolean; + readonly groupId: number; + readonly groupName: string; + readonly sessions: Session[]; + readonly isDefault: boolean; } export interface QuestionAnswers { - readonly id: number; - readonly question: string; - readonly questionType: string; - readonly answer: string; + readonly id: number; + readonly question: string; + readonly questionType: string; + readonly answer: string; } export interface IMeeting { - id: number; - urlName?: string; - title: string; - description: string; - videoUrl?: string; - slidesURL?: string; - videoTags?: string[]; - speakers: SessionSpeaker[]; - level?: string; - type?: string; - language?: string; - track?: string; - startDate: string; - endDate: string; - startTime: string; - endTime: string; + id: number; + urlName?: string; + title: string; + description: string; + videoUrl?: string; + slidesURL?: string; + videoTags?: string[]; + speakers: SessionSpeaker[]; + level?: string; + type?: string; + language?: string; + track?: string; + startDate: string; + endDate: string; + startTime: string; + endTime: string; } export interface IMeetingDetailProps { - meeting: IMeeting; - speakers?: ISpeaker[]; + meeting: IMeeting; + speakers?: ISpeaker[]; + openFeedbackId: string; } export type MyType = { - urlName?: string; - videoUrl?: string; - level?: string; - videoTags?: string[]; - speakers?: ISpeaker[]; - description: string; - language?: string; - title: string; - type?: string; - track?: string; -}; \ No newline at end of file + urlName?: string; + videoUrl?: string; + level?: string; + videoTags?: string[]; + speakers?: ISpeaker[]; + description: string; + language?: string; + title: string; + type?: string; + track?: string; +}; diff --git a/src/views/MeetingDetail/MeetingDetail.tsx b/src/views/MeetingDetail/MeetingDetail.tsx index 4ba0374a4..2cac32b39 100644 --- a/src/views/MeetingDetail/MeetingDetail.tsx +++ b/src/views/MeetingDetail/MeetingDetail.tsx @@ -105,6 +105,7 @@ export const StyledVoteTalkLink = styled.a` const MeetingDetail: FC> = ({ meeting, speakers: mySpeakers, + openFeedbackId, }) => { const { width } = useWindowSize(); @@ -199,9 +200,9 @@ const MeetingDetail: FC> = ({ {meeting.videoTags?.map((tag) => )} -
+
diff --git a/src/views/MeetingDetail/TalkDetailContainer.tsx b/src/views/MeetingDetail/TalkDetailContainer.tsx index 66fa3beb2..b29407eae 100644 --- a/src/views/MeetingDetail/TalkDetailContainer.tsx +++ b/src/views/MeetingDetail/TalkDetailContainer.tsx @@ -1,17 +1,17 @@ -import { Color } from "../../styles/colors"; +import { Color } from "@styles/colors"; import React, { FC, useEffect } from "react"; -import NotFoundError from "../../components/NotFoundError/NotFoundError"; -import SectionWrapper from "../../components/SectionWrapper/SectionWrapper"; +import NotFoundError from "@components/NotFoundError/NotFoundError"; +import SectionWrapper from "@components/SectionWrapper/SectionWrapper"; import { styled } from "styled-components"; import { useParams } from "react-router"; -import conferenceData from "../../data/2025.json"; -import { useFetchTalksById } from "../../hooks/useFetchTalks"; -import { useFetchSpeakers } from "../../hooks/useFetchSpeakers"; +import conferenceData from "@data/2025.json"; +import { useFetchTalksById } from "@hooks/useFetchTalks"; +import { useFetchSpeakers } from "@hooks/useFetchSpeakers"; import MeetingDetail from "./MeetingDetail"; -import { ISpeaker } from "../../types/speakers"; -import { sessionAdapter } from "../../services/sessionsAdapter"; -import { Session } from "../../types/sessions"; -import { useSentryErrorReport } from "../../hooks/useSentryErrorReport"; +import { ISpeaker } from "@types/speakers"; +import { sessionAdapter } from "@services/sessionsAdapter"; +import { Session } from "@types/sessions"; +import { useSentryErrorReport } from "@hooks/useSentryErrorReport"; const StyledContainer = styled.div` background-color: ${Color.WHITE}; @@ -50,6 +50,7 @@ const TalkDetailContainer: FC> = () => { )} {!isLoading && diff --git a/src/views/Talks/Talks.tsx b/src/views/Talks/Talks.tsx index 82c160f37..4f8cac2bc 100644 --- a/src/views/Talks/Talks.tsx +++ b/src/views/Talks/Talks.tsx @@ -1,10 +1,10 @@ import React, { FC, useEffect, useState } from "react"; -import LessThanDarkBlueIcon from "../../assets/images/LessThanDarkBlueIcon.svg"; -import MoreThanBlueIcon from "../../assets/images/MoreThanBlueIcon.svg"; -import SectionWrapper from "../../components/SectionWrapper/SectionWrapper"; -import TitleSection from "../../components/SectionTitle/TitleSection"; -import { Color } from "../../styles/colors"; -import conferenceData from "../../data/2025.json"; +import LessThanDarkBlueIcon from "@assets/images/LessThanDarkBlueIcon.svg"; +import MoreThanBlueIcon from "@assets/images/MoreThanBlueIcon.svg"; +import SectionWrapper from "@components/SectionWrapper/SectionWrapper"; +import TitleSection from "@components/SectionTitle/TitleSection"; +import { Color } from "@styles/colors"; +import conferenceData from "@data/2025.json"; import { StyledMarginBottom, StyledSpeakersSection, @@ -12,13 +12,13 @@ import { StyledTitleIcon, StyledWaveContainer, } from "./Talks.style"; -import TrackInformation from "../../components/common/TrackInformation"; -import { useFetchTalks } from "../../hooks/useFetchTalks"; +import TrackInformation from "@components/common/TrackInformation"; +import { useFetchTalks } from "@hooks/useFetchTalks"; import { SelectButton, SelectButtonChangeEvent } from "primereact/selectbutton"; import "primereact/resources/primereact.min.css"; import "primereact/resources/themes/lara-light-indigo/theme.css"; -import "../../styles/theme.css"; -import { useSentryErrorReport } from "../../hooks/useSentryErrorReport"; +import "@styles/theme.css"; +import { useSentryErrorReport } from "@hooks/useSentryErrorReport"; interface TrackInfo { name: string; @@ -167,6 +167,7 @@ const Talks: FC> = () => { key={track.groupId} track={track} year={conferenceData.edition} + openFeedbackId={conferenceData.openFeedbackId} /> ))} diff --git a/src/views/Talks/components/TalkCard.tsx b/src/views/Talks/components/TalkCard.tsx index c84a60374..9b80d8a08 100644 --- a/src/views/Talks/components/TalkCard.tsx +++ b/src/views/Talks/components/TalkCard.tsx @@ -1,8 +1,13 @@ import React from "react"; -import CommonTalkCard, { TalkCardProps } from "../../../components/common/TalkCard"; +import { + TalkCard as CommonTalkCard, + TalkCardProps, +} from "@components/common/TalkCard"; export type { TalkCardProps }; -export const TalkCard: React.FC> = (props) => { +export const TalkCard: React.FC> = ( + props, +) => { return ; };