initial commit for GitHub
This commit is contained in:
33
client/src/MjSection.tsx
Normal file
33
client/src/MjSection.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
// import { Album } from "./types/Album";
|
||||
import { Col, Container, Row } from "react-bootstrap";
|
||||
import { Artwork } from "./types/Artwork";
|
||||
import MjCard from "./MjCard/MjCard";
|
||||
import { Album } from "./types/Album";
|
||||
|
||||
interface MjSectionProps {
|
||||
sectionTitle: string;
|
||||
works: Artwork[] | Album[];
|
||||
}
|
||||
|
||||
export default function MjSection(props: MjSectionProps) {
|
||||
const sectionTitleAsTitle =
|
||||
props.sectionTitle.charAt(0).toUpperCase() + props.sectionTitle.slice(1);
|
||||
const works = props.works;
|
||||
return (
|
||||
<section id={props.sectionTitle} className="content-section">
|
||||
<h2>{sectionTitleAsTitle}</h2>
|
||||
<Container>
|
||||
<Row>
|
||||
{works.map((work) => (
|
||||
<Col
|
||||
key={`${props.sectionTitle}-${work.id}`}
|
||||
className="d-flex justify-content-center align-items-center"
|
||||
>
|
||||
<MjCard type={props.sectionTitle} work={work} />
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
</Container>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user