Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import StaffPage from "./page/StaffPage";
/* 여기에 Page들을 import 한 후 하나 씩 확인!! */

const App = () => {
return <div></div>;
return <StaffPage/>;
};

export default App;
10 changes: 7 additions & 3 deletions src/components/StaffProfile/StaffProfile.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import React from "react";
import "./StaffProfile.css";

const StaffProfile = () => {
return <div></div>;
const StaffProfile = ({ name, part }) => {
return (
<div className="staff-card">
<p> 이름: {name}</p>
<p>파트: {part}</p>
</div>
);
};

export default StaffProfile;
18 changes: 16 additions & 2 deletions src/components/UserProfile/UserProfile.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
import React from "react";
import "./UserProfile.css";
import lionImage from "./lion.jpeg";

const UserProfile = () => {};

const UserProfile = ({ name, age, major }) => {
return (
<div className="profile-card">
<img src={lionImage} className="profile-img"/>
<div className="profile-top">
<div className="profile-info">

<p>이름: {name}</p>
<p>나이: {age}</p>
<p>학과: {major}</p>
</div>
</div>
</div>
);
};

export default UserProfile;
8 changes: 3 additions & 5 deletions src/page/HomePage.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import UserProfile from "../components/UserProfile/UserProfile";
import UserProfile from "../components/UserProfile/UserProfile.jsx";

const HomePage = () => {
return (
<div>
<UserProfile />
</div>
<UserProfile name ="박준희" age="25" major="컴퓨터공학과"/>
);
};

export default HomePage;
export default HomePage;
11 changes: 9 additions & 2 deletions src/page/StaffPage.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from "react";
import StaffProfile from "../components/StaffProfile/StaffProfile.jsx";

const StaffPage = () => {
const staffs = [
Expand All @@ -8,7 +9,13 @@ const StaffPage = () => {
{ name: "Yerin", part: "FE_홍보" },
];

return <div></div>;
return (
<div className="staff-card-list">
{staffs.map((staff, index) => (
<StaffProfile key={index} name={staff.name} part={staff.part} />
))}
</div>
);
};

export default StaffPage;
export default StaffPage;