-
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 all commits
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 was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...onents/common/Competition/Competition.tsx → ...rc/Components/Competition/Competition.tsx
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
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 "./portfolioMain.style"; | ||
|
||
export default function Portfolio() { | ||
const [users, setUsers] = useState([]); | ||
const [activeUser, setActiveUser] = useState(null); | ||
const navigate = useNavigate(); | ||
|
||
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); | ||
}; | ||
|
||
return ( | ||
<div className="main"> | ||
<div className="content"> | ||
<Head active={true} /> | ||
|
||
<S.SearchBox> | ||
<S.Search> | ||
<S.Searchbox /> | ||
<S.SearchIcon type="button" /> | ||
<S.serchIconLine /> | ||
</S.Search> | ||
<MajorLine/> | ||
</S.SearchBox> | ||
|
||
<Sidename /> | ||
<S.Mo> | ||
{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> | ||
); | ||
} |
File renamed without changes.
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
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
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
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 |
---|---|---|
@@ -0,0 +1,110 @@ | ||
import React from "react"; | ||
import { useState, ChangeEvent, FormEvent } from "react"; | ||
import axios from "axios"; | ||
import Head from "src/Components/head/Head/head"; | ||
import Side from "src/Components/Sidebar/Side/side"; | ||
import ImgPlus from "src/Assets/image/imgplus.png"; | ||
import SubmitImg from "src/Assets/image/submitimg.png"; | ||
import * as s from "./Write.style"; | ||
import { showToast } from "src/constants/Swal/Swal"; | ||
import UseWrite from "src/hooks/Write/useWirte"; | ||
|
||
const Sidewrite = () => { | ||
const { | ||
title, | ||
setTitle, | ||
content, | ||
setContent, | ||
selectPlace, | ||
setselectPlace, | ||
Class, | ||
setSelectClass, | ||
selectedImg, | ||
handleChangeImg, | ||
onSubmitHandler, | ||
} = UseWrite(); | ||
return ( | ||
<s.Main> | ||
<Head active={false} /> | ||
<Side /> | ||
<s.Write_Main> | ||
<s.Writing> | ||
<s.From onSubmit={onSubmitHandler}> | ||
<s.WriteTool> | ||
<s.Tool> | ||
<span>올릴곳</span> | ||
<s.CategorySelect | ||
onChange={(e) => setselectPlace(e.target.value)} | ||
> | ||
<option value="게시물">게시물</option> | ||
<option value="대회">대회</option> | ||
</s.CategorySelect> | ||
</s.Tool> | ||
<s.Tool> | ||
<span>카테고리</span> | ||
<s.CategorySelect | ||
onChange={(e) => setSelectClass(e.target.value)} | ||
> | ||
<option value="web">웹</option> | ||
<option value="server">서버</option> | ||
<option value="Android">안드로이드</option> | ||
<option value="iOS">iOS</option> | ||
<option value="Embedded">임베디드</option> | ||
<option value="design">디자인</option> | ||
<option value="etc">기타</option> | ||
</s.CategorySelect> | ||
</s.Tool> | ||
<s.Tool> | ||
<span>이미지추가</span> | ||
<s.plustimg> | ||
<label htmlFor="change-img"> | ||
<img src={ImgPlus} /> | ||
</label> | ||
<s.btnupload | ||
name="file" | ||
type="file" | ||
id="change-img" | ||
onChange={handleChangeImg} | ||
></s.btnupload> | ||
</s.plustimg> | ||
</s.Tool> | ||
|
||
<s.SubmitButtonMain> | ||
<s.SubmitButton></s.SubmitButton> | ||
<s.plustimg> | ||
<img src={SubmitImg} /> | ||
</s.plustimg> | ||
</s.SubmitButtonMain> | ||
</s.WriteTool> | ||
<s.WriteUnder> | ||
<s.WriteForm> | ||
{/* <div className="write_img1"> | ||
{imageSrc && <img src={imageSrc} alt="Preview" />} | ||
</div> */} | ||
<s.WriteTitlelMain> | ||
<s.WriteTitle | ||
type="text" | ||
placeholder="제목" | ||
value={title} | ||
onChange={(e) => setTitle(e.target.value)} | ||
/> | ||
</s.WriteTitlelMain> | ||
<s.WriteDetailMain> | ||
{selectedImg && <s.WriteImg src={selectedImg} />} | ||
<s.WriteDetail | ||
placeholder="내용" | ||
value={content} | ||
onChange={(e) => setContent(e.target.value)} | ||
></s.WriteDetail> | ||
</s.WriteDetailMain> | ||
{/* {fileName && <div>{fileName}</div>} */} | ||
</s.WriteForm> | ||
</s.WriteUnder> | ||
</s.From> | ||
</s.Writing> | ||
</s.Write_Main> | ||
</s.Main> | ||
); | ||
}; | ||
|
||
export default Sidewrite; |
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
import React, { useState, useEffect } from "react"; | ||
import axios from "axios"; | ||
import { useNavigate } from "react-router-dom"; | ||
import Magnifying from "src/constants/magnifying/Magnifying/Magnifying"; | ||
import * as s from "src/Components/Updown/Post/Post.Style"; | ||
import SEOUL from "src/Assets/image/3.png"; | ||
import { link } from "fs"; | ||
import Pagination from "src/constants/Pagination/Pagination"; | ||
interface Post { | ||
id: number; | ||
author: string; | ||
title: string; | ||
content: string; | ||
date: string; | ||
image: string; | ||
} | ||
|
||
export default function UpdownPost() { | ||
const navigate = useNavigate(); | ||
const [currentPage, setCurrentPage] = useState<number>(1); | ||
const [postsPerPage] = useState<number>(10); | ||
const [posts, setPosts] = useState<Post[]>([]); | ||
const [boardList, setBoardList] = useState([]); | ||
|
||
const getBoardList = async () => { | ||
const resp = await (await axios.get('SERVER_URL')).data; // 2) 게시글 목록 데이터에 할당 | ||
setBoardList(resp.data); // 3) boardList 변수에 할당 | ||
console.log(boardList); | ||
} | ||
|
||
useEffect(() => { | ||
getBoardList(); // 1) 게시글 목록 조회 함수 호출 | ||
}, []); | ||
|
||
//페이지네이션 변경 시 이벤트 처리 | ||
const paginate = (pageNumber: number) => setCurrentPage(pageNumber); | ||
return ( | ||
<s.PostMain> | ||
<s.PostMainView> | ||
<Magnifying /> | ||
<s.Post_border> | ||
<s.PostWrite | ||
onClick={() => { | ||
navigate("/Updownsub"); | ||
}} | ||
> | ||
<s.PostZonecontrol> | ||
<span> 김가영 </span> | ||
<span> 4개교 연합 해커톤 프론트엔드 </span> | ||
<span> | ||
2023년 08월 24일 4개교 연합 해커톤을 진행했다.고종현 님 | ||
@manudeli 경력 요기요에서 -Merchant trine : 사장님 관련 서비스 | ||
사장 사이트, 사장 관리자 서비스 공통 요기요 디자인, FE 나의 | ||
이야기 제대 전, 수포자 고등학생에서 미대생(디자인전공)으로서의 | ||
삶... | ||
</span> | ||
<span>2023.11.02</span> | ||
</s.PostZonecontrol> | ||
<s.Postimg> | ||
<img src={SEOUL} alt="이미지"></img> | ||
</s.Postimg> | ||
</s.PostWrite> | ||
</s.Post_border> | ||
<s.Post_border> | ||
<s.PostWrite | ||
onClick={() => { | ||
navigate("/Updownsub"); | ||
}} | ||
> | ||
{boardList.map((board) => ( | ||
// 4) map 함수로 데이터 출력 | ||
<s.PostZonecontrol> | ||
<span key={board.author}>{board.name}</span> | ||
<span key={board.title}>{board.title}</span> | ||
<span key={board.content}>{board.content}</span> | ||
<span key={board.data}>{board.data}</span> | ||
<s.Postimg> | ||
<img key={board.image}>{board.image}</img> | ||
</s.Postimg> | ||
</s.PostZonecontrol> | ||
))} | ||
</s.PostWrite> | ||
</s.Post_border> | ||
<Pagination | ||
postsPerPage={postsPerPage} | ||
totalPosts={posts.length} | ||
paginate={paginate} | ||
/> | ||
</s.PostMainView> | ||
</s.PostMain> | ||
); | ||
} |
File renamed without changes.
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
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
import styled from "styled-components"; |
File renamed without changes.
Oops, something went wrong.
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 코드 완전히 삭제 해주세요