aboutsummaryrefslogtreecommitdiff
path: root/src/containers/BsuFantomSection/BsuFantomSection.tsx
blob: 496c210a3ea5348dabfdab90676383c1219c3c9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import React from 'react';
import { ContentSection } from 'react-benzin';
import { Grid, Link } from '@material-ui/core';
import EventCard from '../../components/EventCard/EventCard';
import { useEvents } from '../../hooks/APIClient';
import EventForm from './EventForm';


const BsuFantomSection: React.FC = () => {
  const { data: events, mutate } = useEvents();

  return (
    <ContentSection sectionName="bsu-fantom" level={1}>
      <p>
        Schedule your offline <Link href="https://edufpmi.bsu.by">EDUFPMI</Link> conference attendance
      </p>
      <ContentSection sectionName="Schedule an event" level={2}>
        <EventForm mutate={mutate} />
      </ContentSection>
      <ContentSection sectionName="Upcoming events" level={2}>
        <Grid container spacing={2}>
          {events?.map((event, index) => (
            <Grid item xs={4}>
              <EventCard event={event} mutate={mutate} />
            </Grid>
          ))}
        </Grid>
      </ContentSection>
    </ContentSection>
  );
};

export default BsuFantomSection;