♻️ separate teamcard in one component

This commit is contained in:
stefan080106
2022-09-20 15:58:21 +02:00
parent 2cb34c8b40
commit 44d0fb110e
2 changed files with 33 additions and 12 deletions

View File

@@ -0,0 +1,16 @@
import Image from "next/image";
import React from "react";
const TeamCard = (props) => {
return (
<div>
<Image src={props.imgUrl} alt="ProfileImage" width={125} height={125} />
<div>
<h2>{props.name}</h2>
<h3>{props.stellung}</h3>
</div>
</div>
);
};
export default TeamCard;

View File

@@ -1,8 +1,8 @@
import Head from "next/head";
import Image from "next/image";
import StandardStyles from "../styles/Home.module.css";
import styles from "../styles/UeberUns.module.css";
import FadeIn from "react-fade-in";
import TeamCard from "../components/ueber-uns/teamCard";
export default function Home() {
return (
@@ -26,20 +26,25 @@ export default function Home() {
</FadeIn>
</div>
<div style={{ width: "80%" }}>
{/* TODO: ProfileImage */}
<FadeIn delay={500} transitionDuration={1500}>
<h2>Das Team</h2>
<div className={styles.teamContainer}>
<div>
<img
src="https://cdn.discordapp.com/attachments/933369908341932052/983361091063128124/Profile_Image2.png"
alt="ProfileImage"
/>
<div>
<h2>Stefan Arnold</h2>
<h3>Inhaber</h3>
</div>
</div>
{[
{
name: "Stefan Arnold",
stellung: "Inhaber",
imgUrl: "https://cdn.discordapp.com/attachments/933369908341932052/983361091063128124/Profile_Image2.png",
},
].map((member) => {
return (
<TeamCard
key={member.name}
name={member.name}
stellung={member.stellung}
imgUrl={member.imgUrl}
/>
);
})}
</div>
</FadeIn>
</div>