Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions src/2023/Talks/Talks2023.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
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,
StyledTitleContainer,
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;
Expand Down Expand Up @@ -51,7 +51,7 @@ const Talks2023: FC<React.PropsWithChildren<unknown>> = () => {

// Helper function to remove text between parentheses
const removeParenthesesContent = (text: string): string => {
return text.replace(/\s*\([^)]*\)/g, '');
return text.replace(/\s*\([^)]*\)/g, "");
};

const dropDownOptions = [
Expand Down Expand Up @@ -133,6 +133,7 @@ const Talks2023: FC<React.PropsWithChildren<unknown>> = () => {
key={track.groupId}
track={track}
year={conferenceData.edition}
openFeedbackId={conferenceData.openFeedbackId}
/>
))}
</>
Expand Down
25 changes: 13 additions & 12 deletions src/2024/Talks/Talks2024.tsx
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -52,7 +52,7 @@ const Talks2024: FC<React.PropsWithChildren<unknown>> = () => {

// Helper function to remove text between parentheses
const removeParenthesesContent = (text: string): string => {
return text.replace(/\s*\([^)]*\)/g, '');
return text.replace(/\s*\([^)]*\)/g, "");
};

const dropDownOptions = [
Expand Down Expand Up @@ -135,6 +135,7 @@ const Talks2024: FC<React.PropsWithChildren<unknown>> = () => {
key={track.groupId}
track={track}
year={conferenceData.edition}
openFeedbackId={conferenceData.openFeedbackId}
/>
))}
</>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Talk/TalkCard.tsx
Original file line number Diff line number Diff line change
@@ -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 };

Expand Down
20 changes: 10 additions & 10 deletions src/components/common/TalkCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ 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,
StyledSessionText,
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: {
Expand All @@ -43,6 +43,7 @@ export interface TalkCardProps {
categories: SessionCategory[];
questionAnswers: QuestionAnswers[];
};
openFeedbackId: string;
year: string;
showTrack?: boolean;
}
Expand Down Expand Up @@ -73,6 +74,7 @@ export const TalkCard: FC<React.PropsWithChildren<TalkCardProps>> = ({
showTrack = false,
talk,
year,
openFeedbackId,
}) => {
return (
<StyledSessionCard>
Expand Down Expand Up @@ -110,9 +112,9 @@ export const TalkCard: FC<React.PropsWithChildren<TalkCardProps>> = ({
return <Tag key={tag} text={tag} textColor={Color.WHITE} />;
})}
</StyledTagsWrapper>
<section style={{ display: "none" }}>
<section style={{ display: "block" }}>
<StyledVoteTalkLink
href={`https://openfeedback.io/devbcn24/0/${talk.id}`}
href={`https://openfeedback.io/${openFeedbackId}/0/${talk.id}`}
target={"_blank"}
rel="noreferrer noopener"
>
Expand All @@ -123,5 +125,3 @@ export const TalkCard: FC<React.PropsWithChildren<TalkCardProps>> = ({
</StyledSessionCard>
);
};

export default TalkCard;
17 changes: 12 additions & 5 deletions src/components/common/TrackInformation.tsx
Original file line number Diff line number Diff line change
@@ -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) => {
Expand All @@ -24,6 +25,7 @@ const useGenerateAnchorName = (trackName: string) => {
const TrackInformation: FC<React.PropsWithChildren<TrackInfoProps>> = ({
track,
year,
openFeedbackId,
}) => {
const anchorName = useGenerateAnchorName(track.groupName);

Expand All @@ -33,11 +35,16 @@ const TrackInformation: FC<React.PropsWithChildren<TrackInfoProps>> = ({
<StyledSessionSection>
{Array.isArray(track.sessions) &&
track.sessions.map((session) => (
<TalkCard talk={session} key={session.id} year={year} />
<TalkCard
talk={session}
key={session.id}
year={year}
openFeedbackId={openFeedbackId}
/>
))}
</StyledSessionSection>
</div>
);
};

export default React.memo(TrackInformation);
export default React.memo(TrackInformation);
1 change: 1 addition & 0 deletions src/data/2023.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"enabled": true
},
"linkedin": "https://www.linkedin.com/company/devbcn",
"openFeedbackId": "devbcn-2023",
"schedule": {
"enabled": true
},
Expand Down
1 change: 1 addition & 0 deletions src/data/2024.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/data/2025.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"enabled": true
},
"linkedin": "https://www.linkedin.com/company/devbcn",
"openFeedbackId": "TG4hBcL7iPtV2LecVdHu",
"schedule": {
"enabled": true
},
Expand Down
Loading
Loading