Skip to content

Commit

Permalink
Merge pull request #109 from GalsenDev221/dev
Browse files Browse the repository at this point in the history
Event Update 🔁
  • Loading branch information
daoodaba975 authored Jun 3, 2024
2 parents 9f72eeb + 8ac8660 commit cb7462a
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 11 deletions.
5 changes: 5 additions & 0 deletions locales/en/events.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"upcoming": "Upcoming event",
"previous": "Previous event",
"events": {
"galsendev-meetup-3": {
"title": "GalsenDEV Meetup #2",
"desc": "The third edition of the GalsenDEV Meetup where we discussed about GitLab CI",
"full": "For this new session, we had the honor of hosting Ibrahima TIMERA, a passionate and experienced Freelance Developer in the field of Java and Angular development. During this meeting, Ibrahima shared his in-depth knowledge of GitLab CI. The participants had the opportunity to discover the essential steps to optimize their development workflow using proven practices and tools."
},
"weekend-code-3": {
"title": "Weekend Code #3",
"desc": "Third edition of the Code Weekend.",
Expand Down
5 changes: 5 additions & 0 deletions locales/fr/events.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"upcoming": "Évènement à venir",
"previous": "Événement passé",
"events": {
"galsendev-meetup-3": {
"title": "GalsenDEV Meetup #2",
"desc": "Le troisième numéro du GalsenDEV Meetup où on a parlé de GitLab CI.",
"full": "Pour cette nouvelle session, nous avons eu l'honneur d'accueillir Ibrahima TIMERA, un Développeur Freelance passionné et expérimenté dans le domaine du développement Java et Angular. Au cours de cette rencontre, Ibrahima a partagé ses connaissances approfondies sur GitLab CI. Les participants ont eu l'occasion de découvrir les étapes essentielles pour optimiser leur flux de travail de développement grâce à des pratiques et des outils éprouvés."
},
"weekend-code-3": {
"title": "Weekend du Code #3",
"desc": "Troisième édition du Weekend du Code.",
Expand Down
4 changes: 4 additions & 0 deletions other/svg-icons/circle-arrow-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/icons/sprite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/pages/api/events/data.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import { Event } from './type';

export const events: Event[] = [
{
name: 'GalsenDEV Meetup #3',
description:
'GitLab CI : Develop, Test, Build and Deploy your app with Ibrahima TIMERA.',
date: '05/18/2024',
type: 'previous',
full: 'Full description here.',
},
{
name: 'Weekend Code #3',
description: 'Third edition of the Code Weekend.',
Expand Down
17 changes: 6 additions & 11 deletions src/pages/events/[slug]/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import useSWR from 'swr';
import Link from 'next/link';
import { useRouter } from 'next/router';
import useTranslation from 'next-translate/useTranslation';

import { Event, ResponseError } from '@/pages/api/events/type';
import Header from '@/components/Header';
import { Icon } from '@/components/ui/icon';

const fetcher = async (url: string) => {
const res = await fetch(url);
Expand All @@ -21,10 +23,6 @@ export default function EventDetailPage() {
const router = useRouter();
const slug = router.query.slug as string;

const handleGoBack = () => {
router.back();
};

const { data, error, isLoading } = useSWR<Event, ResponseError>(
() => (slug ? '/api/events/' + slug : null),
fetcher
Expand All @@ -40,13 +38,10 @@ export default function EventDetailPage() {
<Header header={translationCommon('events.header')} />
<div className="px-4 mt-16 mx-auto max-w-lg md:max-w-3xl lg:max-w-screen-xl sm:px-6 lg:px-8">
<section>
<button // TODO: maybe we can add a icon here
onClick={handleGoBack}
className="text-white font-bold py-2 px-4 rounded"
>
⬅️
</button>
<hgroup className="space-y-2">
<Link href="/events" className="text-white font-bold py-4 rounded">
<Icon name="circle-arrow-left" className="w-7 h-7 text-gray-900" />
</Link>
<hgroup className="space-y-2 py-3">
<span className="rounded-full bg-blue-100 px-2.5 py-0.5 text-xs text-blue-600">
{t(`eventsPage.${data.type}`)}
</span>
Expand Down
1 change: 1 addition & 0 deletions types/name.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export type IconName =
| 'arrow-right'
| 'caret-sort'
| 'check'
| 'circle-arrow-left'
| 'commit-icon'
| 'cross-1'
| 'discord'
Expand Down

0 comments on commit cb7462a

Please sign in to comment.