Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add linkedin link around cards #100

Merged
merged 3 commits into from
Feb 18, 2025
Merged
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
2 changes: 1 addition & 1 deletion directus
Submodule directus updated 6 files
+12 −0 directus.yaml
+73 −0 flows.sql
+1 −0 load.sh
+5 −1 save.sh
+3,983 −1,616 snapshot.yaml
+748 −4 types/schema.d.ts
8 changes: 6 additions & 2 deletions src/components/IcbdActivityCard.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import DirectusImage from "./DirectusImage";
import { getTranslation, locale } from "@/locales";
import styles from "@/styles/IcbdActivityCard.module.scss";
import { ICBDActivity, ICBDSpeaker, ICBDSpeakerActivityRelation } from "@/types/aliases";
import {
ICBDActivity,
ICBDSpeaker,
ICBDSpeakerActivityRelation,
} from "@/types/aliases";
import { useRouter } from "next/router";
import Markdown from "react-markdown";
import DirectusImage from "./DirectusImage";

export default function IcbdActivityCard(props: { activity: ICBDActivity }) {
const router = useRouter();
16 changes: 13 additions & 3 deletions src/pages/association.tsx
Original file line number Diff line number Diff line change
@@ -101,7 +101,7 @@ export const getServerSideProps: GetServerSideProps<{
result.map((s) => s.social_links_id)
)) as SocialLink[],
poles: await directus().request(
readItems("association_poles", queryTranslations)
readItems("association_poles", queryTranslations as any)
),
committee: (await directus().request(
readItems("association_memberships", {
@@ -110,14 +110,24 @@ export const getServerSideProps: GetServerSideProps<{
{ member: ["*"] },
//@ts-ignore
{ translations: ["*"] },
{ pole: ["*", { translations: ["*"] }] },
{
pole: [
"*",
//@ts-ignore
{ translations: ["*"] },
],
},
],
filter: { level: { _eq: "committee" } },
})
)) as (AssociationMembership & { member: Member })[],
publicFiles: await directus().request(
readItems("association_public_files", {
fields: ["*", { translations: ["*"], icon: ["*"] }],
fields: [
"*",
//@ts-ignore
{ translations: ["*"], icon: ["*"] },
],
})
),
},
1 change: 1 addition & 0 deletions src/pages/commissions.tsx
Original file line number Diff line number Diff line change
@@ -57,6 +57,7 @@ export const getServerSideProps: GetServerSideProps<{
"name",
"slug",
"id",
//@ts-ignore
{ translations: ["banner", "small_description", "languages_code"] },
],
})
1 change: 1 addition & 0 deletions src/pages/commissions/[slug].tsx
Original file line number Diff line number Diff line change
@@ -68,6 +68,7 @@ export const getServerSideProps: GetServerSideProps<
}

let commissions = await directus().request(
//@ts-ignore
readItems("commissions", {
filter: { slug: { _eq: context.params.slug } },
...queryTranslations,
39 changes: 30 additions & 9 deletions src/pages/icbd.tsx
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ import pageStyle from "@/styles/Page.module.scss";
import { ICBD, ICBDActivity, ICBDPhd, ICBDSpeaker } from "@/types/aliases";
import { readItems, readSingleton } from "@directus/sdk";
import { GetServerSideProps, InferGetServerSidePropsType } from "next";
import Link from "next/link";
import { useRouter } from "next/router";
import Markdown from "react-markdown";

@@ -147,14 +148,24 @@ export default function ICBDPage(

<div className={style.alumni}>
<div className={style.alumniList}>
{props.speakers.map((speaker: ICBDSpeaker) => (
<Card
key={speaker.id}
img={speaker.picture}
title={`${speaker.first_name} ${speaker.last_name}` || ""}
description={speaker.company || ""}
/>
))}
{props.speakers.map((speaker: ICBDSpeaker) => {
const card = (
<Card
key={speaker.id}
img={speaker.picture}
title={`${speaker.first_name} ${speaker.last_name}` || ""}
description={speaker.company || ""}
/>
);

return speaker.linkedin ? (
<Link key={speaker.id} href={speaker.linkedin}>
{card}
</Link>
) : (
card
);
})}
</div>
</div>
</div>
@@ -221,6 +232,7 @@ export const getServerSideProps: GetServerSideProps<{
"end_time",
"timetable",
{ partners_images: ["*"] },
//@ts-ignore
{
translations: ["*"],
},
@@ -229,7 +241,14 @@ export const getServerSideProps: GetServerSideProps<{
),
speakers: await directus().request(
readItems("icbd_speakers", {
fields: ["id", "picture", "first_name", "last_name", "company"],
fields: [
"id",
"picture",
"first_name",
"last_name",
"company",
"linkedin",
],
})
),
phds: await directus().request(
@@ -244,7 +263,9 @@ export const getServerSideProps: GetServerSideProps<{
"icon",
"timeslots",
"color",
//@ts-ignore
{ translations: ["*"] },
//@ts-ignore
"hosts.icbd_speakers_id.*",
],
})
10 changes: 9 additions & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -123,6 +123,7 @@ export const getServerSideProps: GetServerSideProps<
{
partners_id: [
"*",
//@ts-ignore
{ category: ["*", { translations: ["*"] }] },
],
},
@@ -149,6 +150,7 @@ export const getServerSideProps: GetServerSideProps<
"slug",
"date_created",
{
//@ts-ignore
translations: [
"title",
"banner",
@@ -165,15 +167,21 @@ export const getServerSideProps: GetServerSideProps<
"*",
{ member: ["*"] },
//@ts-ignore
//@ts-ignore
{ translations: ["*"] },
//@ts-ignore
{ pole: ["slug", { translations: ["name", "languages_code"] }] },
],
filter: { level: { _eq: "committee" } },
})
)) as (AssociationMembership & { member: Member })[],
publicFiles: await directus().request(
readItems("association_public_files", {
fields: ["*", { translations: ["*"], icon: ["*"] }],
fields: [
"*",
//@ts-ignore
{ translations: ["*"], icon: ["*"] },
],
})
),
gallery: await directus().request(
1 change: 1 addition & 0 deletions src/pages/news.tsx
Original file line number Diff line number Diff line change
@@ -56,6 +56,7 @@ export const getServerSideProps: GetServerSideProps<{
"slug",
"date_created",
{
//@ts-ignore
translations: [
"title",
"banner",
3 changes: 3 additions & 0 deletions src/pages/news/[slug].tsx
Original file line number Diff line number Diff line change
@@ -84,6 +84,7 @@ export const getServerSideProps: GetServerSideProps<{
}

let news = await directus().request(
//@ts-ignore
readItems("news", {
...queryTranslations,
limit: 1,
@@ -97,8 +98,10 @@ export const getServerSideProps: GetServerSideProps<{

let commissions = (await directus()
.request(
//@ts-ignore
readItems("news_commissions", {
...queryTranslations,
//@ts-ignore
fields: [{ commissions_id: ["*.*"] }],
filter: { news_id: { _eq: news[0].id } },
})
2 changes: 2 additions & 0 deletions src/pages/save-the-date.tsx
Original file line number Diff line number Diff line change
@@ -402,6 +402,7 @@ export const getServerSideProps: GetServerSideProps<{
"text_color",
"title_color",
"button_color",
//@ts-ignore
{ translations: ["*"] },
"language_button_target",
],
@@ -418,6 +419,7 @@ export const getServerSideProps: GetServerSideProps<{
"text_color",
"button_color",
"recurrence",
//@ts-ignore
{ translations: ["*"], commission: ["id", "name"] },
],
})
2 changes: 2 additions & 0 deletions src/pages/subsonic.tsx
Original file line number Diff line number Diff line change
@@ -107,6 +107,7 @@ export const getServerSideProps: GetServerSideProps<{
subsonic: await directus().request(
// @ts-ignore
readSingleton("subsonic", {
//@ts-ignore
fields: ["header_image", "logo", "map", { translations: ["*"] }],
})
),
@@ -120,6 +121,7 @@ export const getServerSideProps: GetServerSideProps<{
{
partners_id: [
"*",
//@ts-ignore
{ category: ["*", { translations: ["*"] }] },
],
},
Loading