diff --git a/components/home/Banner.tsx b/components/home/Banner.tsx index add620e..9eb6bfa 100644 --- a/components/home/Banner.tsx +++ b/components/home/Banner.tsx @@ -6,7 +6,7 @@ export const Banner = () => {

welcome to
- DROIDCONKE23 + DROIDCONKE24

@@ -46,13 +46,13 @@ export const Banner = () => {
- droid alt + /> */}
- 08TH - 10TH
+ 06TH - 8TH
NOVEMBER
diff --git a/components/home/Sponsor.tsx b/components/home/Sponsor.tsx index 8197ef1..d366144 100644 --- a/components/home/Sponsor.tsx +++ b/components/home/Sponsor.tsx @@ -9,7 +9,7 @@ export const Sponsor = () => {

sponsor{' '} - droidconke23 + droidconke24

diff --git a/components/home/SponsorsList.tsx b/components/home/SponsorsList.tsx index e58c7cb..9e3079b 100644 --- a/components/home/SponsorsList.tsx +++ b/components/home/SponsorsList.tsx @@ -58,14 +58,22 @@ function SponsorsList({

- sponsored by; + {year === 24 ? '' : `dcKe${year}`} sponsored{' '} + by;

-

- Please make sure to stop by and visit our sponsors at the show - and give them a high-five and a huge thank you for helping to - bring the community together at droidconke. -

+ {year === 24 ? ( +

+ Please make sure to stop by and visit our sponsors at the show + and give them a high-five and a huge thank you for helping to + bring the community together at droidconke. +

+ ) : ( +

+ Thanks for being our sponsors and for making droidconKe 20 + {year} a success. +

+ )}
diff --git a/components/layouts/components/Footer.tsx b/components/layouts/components/Footer.tsx index 2d35b57..34440eb 100644 --- a/components/layouts/components/Footer.tsx +++ b/components/layouts/components/Footer.tsx @@ -36,17 +36,17 @@ export const Footer = () => {
{showExtraInfo && ( diff --git a/components/layouts/components/NavBar.tsx b/components/layouts/components/NavBar.tsx index 85fb5f0..ac09166 100644 --- a/components/layouts/components/NavBar.tsx +++ b/components/layouts/components/NavBar.tsx @@ -79,7 +79,7 @@ export const NavBar = () => {
  • @@ -142,20 +142,24 @@ export const NavBar = () => {
- {/*
*/} - {/* */} - {/* - get your ticket - */} - {/* */} - {/*
*/} + -
+
{showLogin && (!isAuthenticated ? (
+
)}
diff --git a/components/speakers/SpeakersList.tsx b/components/speakers/SpeakersList.tsx new file mode 100644 index 0000000..7fd404b --- /dev/null +++ b/components/speakers/SpeakersList.tsx @@ -0,0 +1,33 @@ +import { Session, Speaker } from '../../types/types' +import { SpeakerCard } from './SpeakerCard' + +export const SpeakersList = ({ + speakers, + sessions, +}: { + speakers: Speaker[] + sessions: Session[] +}) => ( +
+

+ All speakers +

+
+
+ {speakers.map((speaker) => { + const speakerSession = sessions.find((s) => + s.speakers.find((sp) => sp.name === speaker.name) + ) + + return ( + + ) + })} +
+
+
+) diff --git a/context/ThemeContext.tsx b/context/ThemeContext.tsx index d8095ec..713725f 100644 --- a/context/ThemeContext.tsx +++ b/context/ThemeContext.tsx @@ -15,7 +15,7 @@ const THEME_NAME = 'droidcon_theme' export const ThemeProvider = ({ children }: { children: ReactNode }) => { const [isDarkTheme, setIsDarkTheme] = useState(false) - const isEventReady = Boolean(process.env.NEXT_PUBLIC_EVENT_READY) || false + const isEventReady = process.env.NEXT_PUBLIC_EVENT_READY === 'true' || false useEffect(() => { if (isClient) { diff --git a/middleware.ts b/middleware.ts index 34698c0..d2930e6 100644 --- a/middleware.ts +++ b/middleware.ts @@ -1,9 +1,9 @@ import { NextResponse } from 'next/server' import type { NextRequest } from 'next/server' -const isEventReady = Boolean(process.env.NEXT_PUBLIC_EVENT_READY) || false +const isEventReady = process.env.NEXT_PUBLIC_EVENT_READY === 'true' || false -const BLOCKED_ROUTES = ['/sessions'] +const BLOCKED_ROUTES = ['/sessions', '/speakers'] export function middleware(request: NextRequest) { if (!isEventReady && BLOCKED_ROUTES.includes(request.nextUrl.pathname)) { diff --git a/pages/about.tsx b/pages/about.tsx index b74d87c..1b2c690 100644 --- a/pages/about.tsx +++ b/pages/about.tsx @@ -39,7 +39,7 @@ const About: NextPage = ({ organizers }) => { apps and products, and to learn and teach.

This three-day developer focused gathering will be held in - Nairobi Kenya on November 8th to 10th 2023 and will be the + Nairobi Kenya on November 6th to 8th 2024 and will be the largest of its kind in Africa.

It will have workshops and codelabs focused on the building of @@ -83,8 +83,8 @@ const About: NextPage = ({ organizers }) => { and products in the ecosystem.

- The three-day gathering will be held in Nairobi, Kenya, from 8th - to 10th November 2023 and will be the largest in Africa. + The three-day gathering will be held in Nairobi, Kenya, from 6th + to 8th November 2024 and will be the largest in Africa.

The conference will include workshops, codelabs and talks geared @@ -106,7 +106,7 @@ const About: NextPage = ({ organizers }) => { Tanzania and Nigeria graced the event.

- This year, we will host the 4th in-person event. Tech + This year, we will host the 5th in-person event. Tech communities from the East African Region and continental members will be present. Participants will have an excellent chance to learn about Android development, opportunities and services in diff --git a/pages/index.tsx b/pages/index.tsx index 6b0d11e..88ba17f 100755 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -28,7 +28,7 @@ const Home: NextPage = ({ organizers, sponsors }) => { about droidconke

- This 4th in-person event will include several tech communities + This 5th in-person event will include several tech communities from the East African Region and continental members. Participants will have an excellent chance to learn about Android development and opportunities and to network with Android experts in the diff --git a/pages/past-events/2022.tsx b/pages/past-events/2022.tsx index 4747f71..25aeae0 100644 --- a/pages/past-events/2022.tsx +++ b/pages/past-events/2022.tsx @@ -44,7 +44,7 @@ const Home2022: NextPage = ({

- Sessions + dcke22 Sessions

= ({ + schedules: allSchedules, + event, + sponsors, + sessions, + speakers, +}) => { + const { + schedules, + isGridView, + setShowFilterSession, + setActiveTab, + changeViewType, + setShowMysessions, + showMySessions, + loading, + activeTab, + showFilterSession, + filterSession, + } = useSession({ allSchedules }) + + return ( + <> +
+
+
+
+

+ dcKe23 Sessions +

+ +
+
+
+ +
+ {!loading ? ( +
+
+ {Object.keys(schedules)?.map((key, i) => { + return ( +
setActiveTab(i)} + aria-hidden="true" + > +

+ {timeDay(key)}{' '} + + Day {i + 1} + +

+
+ ) + })} +
+
+
+ {isGridView ? ( + + ) : ( + + )} +
+
+
+ ) : ( + + )} +
+
+ +
+ +
+ {showFilterSession && ( + + )} + + ) +} + +export default Home2023 + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export async function getServerSideProps({ req, res }: { req: any; res: any }) { + axios.defaults.headers.common.Authorization = `Bearer ${getCookie('token', { + req, + res, + })}` + const schedules = await axios + .get( + `/events/${process.env.NEXT_PUBLIC_EVENT_SLUG_2023}/schedule?grouped=true` + ) + .then((response) => { + return response.data.data + }) + .catch(() => { + return null + }) + + const event = await axios + .get(`/events/${process.env.NEXT_PUBLIC_EVENT_SLUG_2023}`) + .then((response) => { + return response.data.data + }) + .catch(() => { + return null + }) + + const sponsors = await axios + .get(`/events/${process.env.NEXT_PUBLIC_EVENT_SLUG_2023}/sponsors`) + .then((response) => { + return response.data.data + }) + + const speakers = await axios + .get(`/events/${process.env.NEXT_PUBLIC_EVENT_SLUG}/speakers?per_page=100`) + .then((response) => { + return response.data.data + }) + + const sessions = await axios + .get(`/events/${process.env.NEXT_PUBLIC_EVENT_SLUG}/sessions?per_page=100`) + .then((response) => { + return response.data.data + }) + + if (!schedules) { + return { + notFound: true, + } + } + + return { props: { schedules, event, sponsors, speakers, sessions } } +} diff --git a/pages/speakers.tsx b/pages/speakers.tsx index a95a8f3..d77dc44 100644 --- a/pages/speakers.tsx +++ b/pages/speakers.tsx @@ -1,7 +1,7 @@ import axios from '../utils/axios' import { Speaker, Session } from '../types/types' // import { KeynoteSpeakers } from '../components/speakers/KeynoteSpeakers' -import { SpeakerCard } from '../components/speakers/SpeakerCard' +import { SpeakersList } from '../components/speakers/SpeakersList' export default function SpeakersPage({ speakers, @@ -31,28 +31,7 @@ export default function SpeakersPage({
*/} -
-

- All speakers -

-
-
- {speakers.map((speaker) => { - const speakerSession = sessions.find((s) => - s.speakers.find((sp) => sp.name === speaker.name) - ) - - return ( - - ) - })} -
-
-
+
diff --git a/pages/sponsors.tsx b/pages/sponsors.tsx index e577097..e1e7011 100644 --- a/pages/sponsors.tsx +++ b/pages/sponsors.tsx @@ -71,7 +71,7 @@ export default function SponsorsPage({ sponsors }: { sponsors: Sponsor[] }) {
{/* dread */}

- dcKE23 at a glance + dcKE24 at a glance

@@ -79,7 +79,7 @@ export default function SponsorsPage({ sponsors }: { sponsors: Sponsor[] }) { 700+
- 2023 Attendees Target + 2024 Attendees Target
@@ -115,7 +115,7 @@ export default function SponsorsPage({ sponsors }: { sponsors: Sponsor[] }) {

- Sponsor droidcon23 + Sponsor droidcon24

@@ -152,7 +152,7 @@ export default function SponsorsPage({ sponsors }: { sponsors: Sponsor[] }) {

- To Sponsor Droidcoke 2023 + To Sponsor Droidcoke 2024 Contacts us at?