-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
♻ ::
MajorLine 컴포넌트 분리
#39
Merged
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
46db270
`♻ ::` MajorLine 컴포넌트 분리
whywwhy 14d590d
`♻ ::` sopo..
whywwhy 6a4df0e
profile :: 완료
ftery0 9487170
:sparkles: 서버연결
kyumin7487 496406d
wirte test $36
ftery0 377813d
write test #36
ftery0 d26b40c
Major 클릭
ftery0 e82ffd6
⚡ :: portfolioMajorline
whywwhy 504f5b9
⚡ :: api
whywwhy 5f32276
글쓰기 서버 연결 확인 및 #36
greenfrog616 0e9b680
⚡ :: api
whywwhy b8ef0a7
⚡ :: package.json axios
whywwhy bad5781
📑 :: css 삭제
whywwhy 811666f
♻️:: 오류 수정
greenfrog616 8f79464
Revert "♻️:: 오류 수정"
greenfrog616 04887fb
rename :: SOPO파일 변경
ftery0 425f417
lll
ftery0 68ea074
test
ftery0 54e6eb7
오류
ftery0 441062c
Merge branch 'test' into feature/#36
ftery0 4352fa5
Merge pull request #51 from Sopo2023/feature/#36
ftery0 5ec3480
Merge branch 'test' into feature/Updownpage
ftery0 3278209
Merge pull request #52 from Sopo2023/feature/Updownpage
ftery0 0dbefde
Merge branch 'test' into whywhywwwhy/#38/PortfolioServer
ftery0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,35 @@ | ||
import React from "react"; | ||
import React, { useState, useEffect } from "react"; | ||
import { useNavigate } from "react-router-dom"; | ||
import Sidename from "src/constants/Sidebar/Side/side"; | ||
import "./protfolio.css"; | ||
import Head from "../../constants/head/Head/head" | ||
import MajorLine from "../../constants/MajorLine/Major" | ||
import axios from "axios"; | ||
|
||
import * as S from "../Portfolio/portfolioMain.style" | ||
|
||
export default function Portfolio() { | ||
const majorClick = (major) => { | ||
console.log(`Clicked on ${major}`); | ||
}; | ||
|
||
const majorbutton: HTMLElement | null = document.getElementById('majorbutton'); | ||
const [users, setUsers] = useState([]); | ||
const [activeUser, setActiveUser] = useState(null); | ||
const navigate = useNavigate(); | ||
|
||
if (majorbutton) { | ||
majorbutton.addEventListener('click', function() { | ||
if (majorbutton.classList.contains('clicked')) { | ||
majorbutton.classList.remove('clicked'); | ||
} else { | ||
majorbutton.classList.add('clicked'); | ||
useEffect(() => { | ||
const fetchUsers = async () => { | ||
try { | ||
const response = await axios.get("히ㅣㅎ api"); | ||
setUsers(response.data); | ||
} catch (error) { | ||
console.error("Error fetching users:", error); | ||
} | ||
}); | ||
} | ||
}; | ||
|
||
fetchUsers(); | ||
}, []); | ||
|
||
const handleNameCardClick = (user) => { | ||
setActiveUser(user); | ||
}; | ||
|
||
const navigate = useNavigate(); | ||
return ( | ||
<div className="main"> | ||
<div className="content"> | ||
|
@@ -42,48 +47,19 @@ export default function Portfolio() { | |
|
||
<Sidename /> | ||
<S.Mo> | ||
<S.NameCardBox | ||
className="namecardBox" | ||
onClick={() => { | ||
navigate("/52562893"); | ||
}} | ||
> | ||
<S.CardName>배채희</S.CardName> | ||
<S.CardGrade> DGSW 8th </S.CardGrade> | ||
<S.CardMail> Mail - [email protected] </S.CardMail> | ||
</S.NameCardBox> | ||
|
||
<S.NameCardBox2 | ||
onClick={() => { | ||
navigate("/12362153"); | ||
}} | ||
> | ||
<S.CardName>박규민</S.CardName> | ||
<S.CardGrade> DGSW 8th </S.CardGrade> | ||
<S.CardMail> Mail - [email protected] </S.CardMail> | ||
</S.NameCardBox2> | ||
|
||
<S.NameCardBox3> | ||
<S.CardName> 전우진 </S.CardName> | ||
<S.CardGrade> DGSW 8th </S.CardGrade> | ||
<S.CardMail> Mail - [email protected] </S.CardMail> | ||
</S.NameCardBox3> | ||
|
||
<S.NameCardBox5> | ||
<S.CardName> 이윤선 </S.CardName> | ||
<S.CardGrade> DGSW 8th </S.CardGrade> | ||
<S.CardMail> Mail - [email protected] </S.CardMail> | ||
</S.NameCardBox5> | ||
|
||
<S.NameCardBox4> | ||
<S.CardName> 이예진 </S.CardName> | ||
<S.CardGrade> DGSW 8th </S.CardGrade> | ||
<S.CardMail> Mail - [email protected] </S.CardMail> | ||
</S.NameCardBox4> | ||
{users.map((user) => ( | ||
<S.NameCardBox | ||
key={user.id} | ||
className="namecardBox" | ||
onClick={() => handleNameCardClick(user)} | ||
> | ||
<S.CardName>{user.name}</S.CardName> | ||
<S.CardGrade>{user.grade}</S.CardGrade> | ||
<S.CardMail>{user.mail}</S.CardMail> | ||
</S.NameCardBox> | ||
))} | ||
</S.Mo> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
// export default portfolio(); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
css 코드 완전히 삭제 해주세요