Skip to content

Commit

Permalink
feat: add iron section to sponsors
Browse files Browse the repository at this point in the history
  • Loading branch information
vilaboim committed Oct 1, 2024
1 parent a7af13c commit fc2b7d7
Showing 1 changed file with 67 additions and 53 deletions.
120 changes: 67 additions & 53 deletions src/components/sponsors-section/sponsors-section.tsx
Original file line number Diff line number Diff line change
@@ -1,63 +1,78 @@
/*eslint-disable*/
import { Sponsor } from "models/sponsor";
import {
Container,
Row,
Col,
} from "reactstrap";
import _supports from '../../hooks/userSupports';
import { Container, Row, Col } from "reactstrap";
import _supports from "../../hooks/userSupports";
import { SponsorLevel } from "models/sponsor-level";
import SponsorCard from "./sponsor-card";

import styles from './Sponsors.module.css'
import styles from "./Sponsors.module.css";

interface StringMap { [key: string]: any; }
interface StringMap {
[key: string]: any;
}

const SPONSORS_LIST: string[] = ["superior", "diamond", "golden", "silver", "bronze", "ruby", "ametista", "support", "staff"];
const SPONSORS_LIST: string[] = [
"superior",
"diamond",
"golden",
"silver",
"bronze",
"iron",
"ruby",
"ametista",
"support",
"staff",
];

interface SponsorsSectionProps {
sponsors: { [key: string]: SponsorLevel },
sponsors: { [key: string]: SponsorLevel };
}

const SponsorsSection: React.FC<SponsorsSectionProps> = ({ sponsors }) => {
return (
<Container style={{ paddingLeft: "0px" }}>
<section className={styles.SponsorSection}>
<Container>
<Row>
<Col lg={4} sm={12}>
<h2 className="gdg-line">
Patrocinadores
</h2>
</Col>
</Row>
</Container>
return (
<Container style={{ paddingLeft: "0px" }}>
<section className={styles.SponsorSection}>
<Container>
<Row>
<Col lg={4} sm={12}>
<h2 className="gdg-line">Patrocinadores</h2>
</Col>
</Row>
</Container>

{sponsors && (
<Container fluid>
<div id="sponsors">
{SPONSORS_LIST.map((el, i) => {
const sponsorLevel = sponsors[el]
const isStaff = el === "staff"
{sponsors && (
<Container fluid>
<div id="sponsors">
{SPONSORS_LIST.map((el, i) => {
const sponsorLevel = sponsors[el];
const isStaff = el === "staff";

if (sponsors[el] != null)
return (
<section key={el}>
<h4>
{sponsorLevel.name}
</h4>
<Row>
<div className={isStaff ? styles.StaffWrapper : styles.SponsorWrapper}>
{sponsorLevel.items.map((item) => (
<SponsorCard key={item.name} isStaff={isStaff} {...item} />
))}
</div>
</Row>
</section>
)
})}
if (sponsors[el] != null)
return (
<section key={el}>
<h4>{sponsorLevel.name}</h4>
<Row>
<div
className={
isStaff
? styles.StaffWrapper
: styles.SponsorWrapper
}
>
{sponsorLevel.items.map((item) => (
<SponsorCard
key={item.name}
isStaff={isStaff}
{...item}
/>
))}
</div>
</Row>
</section>
);
})}

{/*<h4>
{/*<h4>
Organização
</h4>
Expand All @@ -71,13 +86,12 @@ const SponsorsSection: React.FC<SponsorsSectionProps> = ({ sponsors }) => {
</div>
</Row>
</div>*/}
</div>
</Container>
)}
</section>
</Container>
);
}
</div>
</Container>
)}
</section>
</Container>
);
};

export default SponsorsSection;

0 comments on commit fc2b7d7

Please sign in to comment.