Skip to content
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

부림이 0.4.3v 배포 #302

Merged
merged 155 commits into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
9d85a80
Style: 공지사항 리스트 디자인 변경
pp449 Oct 13, 2023
311b520
Design: 공지사항 리스트 UI 변경
pp449 Oct 15, 2023
5f293fc
Test: 테스트코드에 전역 상태값을 사용하기 위해 프로바이더 추가
pp449 Oct 15, 2023
2ccd386
Merge branch 'dev' of https://github.com/GDSC-PKNU-21-22/pknu-notice …
hwinkr Nov 3, 2023
3bfca87
Delete: 사용하지 않는 .gitkeep 파일 삭제
hwinkr Nov 4, 2023
875de9e
Config: 공지사항 관련 타입 추가
hwinkr Nov 4, 2023
c4b960d
Refactor: 링크 이동 함수 변경, 스타일 컴포넌트 이름 수정
hwinkr Nov 4, 2023
ee30cb0
Refactor: url에 따라 다른 공지사항을 렌더링 하도록 수정
hwinkr Nov 4, 2023
c4d5a2a
Test: 모킹하는 useMajor 훅에 graduationLink 추가
hwinkr Nov 4, 2023
dc2f6ae
Style: InformCard 컴포넌트 스타일 수정
hwinkr Nov 4, 2023
90fbb37
Chore: css selector에서 띄어쓰기로 인한 린트 에러를 해결
hwinkr Nov 4, 2023
9864252
Test: 모킹하는 useMajor 훅에 graduationLink 추가
hwinkr Nov 4, 2023
fc159c6
Refactor: MajorProvider가 graduationLink도 책임 지도록 수정
hwinkr Nov 4, 2023
fc8d607
Style: ConfirmModal 네, 아니오 위치 변경
hwinkr Nov 4, 2023
0737cb0
Config: 공지사항 관련 상수 설정
hwinkr Nov 4, 2023
8a2739e
Config: 경로들을 상수로 설정
hwinkr Nov 4, 2023
5b987fe
Chore: placeholder에 공지사항 검색 추가
hwinkr Nov 4, 2023
ac95f84
Chore: 토스트 메세지에 공지사항 검색 키워드가 없을 경우의 메세지 추가
hwinkr Nov 4, 2023
394655b
Refactor: MajorContext에 graduationLink 추가
hwinkr Nov 4, 2023
c4ee695
Refactor: Announcement 컴포넌트는 라우팅 책임만 지도록 변경
hwinkr Nov 4, 2023
d774d20
Feat: 공지사항 페이지 컴포턴트 구현
hwinkr Nov 4, 2023
2611491
Feat: 공지사항 검색 컴포넌트 구현
hwinkr Nov 4, 2023
f95add6
Feat: 공지사항 검색 결과 렌더링 컴포넌트 구현
hwinkr Nov 4, 2023
adb21ae
Feat: 공지 & 일반 구분 버튼 컴포넌트 구현
hwinkr Nov 4, 2023
6d33105
Chore: 공지사항 페이지를 구성하는 컴포넌트 한번에 export
hwinkr Nov 4, 2023
a4ef789
Test: 홈페이지에 렌더링 되는 텍스트 변경
hwinkr Nov 4, 2023
bec98e3
Refactor: 홈페이지 컴포넌트 구성 변경
hwinkr Nov 4, 2023
b26cbc1
Feat: 공지사항 관련 카드 컴포넌트를 묶은 컴포넌트를 구현
hwinkr Nov 4, 2023
dc62ac5
Test: 모킹하는 useMajor 훅에 graduationLink 추가
hwinkr Nov 4, 2023
af319f7
Feat: 링크를 이동 시키는 유틸함수 구현
hwinkr Nov 4, 2023
31b547c
Feat: 공지사항 검색 결과가 없을 경우 보여 줄 컴포넌트 분리
hwinkr Nov 16, 2023
47b3c3b
Refactor: 공지사항 검색 결과를 판단하는 함수 로직 수정
hwinkr Nov 16, 2023
dbdf111
Merge pull request #274 from GDSC-PKNU-Official/style/#273
hwinkr Nov 17, 2023
4c9018c
refactor: 폴더 구조 변경으로 변경 전 파일들 삭제
hwinkr Nov 17, 2023
3014941
Test: 폴더 구조 변경으로 Provider 컴포넌트 import 경로 변경
hwinkr Nov 17, 2023
b6290ba
chore(change import path): 폴더 구조 변경으로 인한 import 경로 수정
hwinkr Nov 17, 2023
9bcc199
refactor: App 컴포넌트에서 Header 컴포넌트의 렌더링을 결정하지 않도록 변경
hwinkr Nov 17, 2023
c3d3bcc
refactor: 지도 페이지를 방문한 경우 Header 컴포넌트를 렌더링 하지 않도록 변경
hwinkr Nov 17, 2023
86bc0ee
chore: 폴더 구조 변경으로 인한 import 경로 수정, 상수 컨벤션 맞춤
hwinkr Nov 17, 2023
e26c0b4
chore: 지도 위 오버레이들을 관리하는 Overlay 클래스 폴더 구조 변경 반영
hwinkr Nov 17, 2023
1033a92
refactor(add common folder): 공통 컴포넌트 폴더 생성
hwinkr Nov 17, 2023
3e68090
rafactor(add providers folder): Providers 폴더 생성 후 의존성 주입을 위한 Provider…
hwinkr Nov 17, 2023
60c4491
refactor: 지도 페이지를 제외한 페이지들의 레이아웃을 맞추는 컴포넌트를 components 폴더 내부로 이동
hwinkr Nov 17, 2023
2c14626
refactor: 지도 위 오버레이들을 관리하는 Overlay클래스 경로 변경
hwinkr Nov 17, 2023
f77ba9c
refactor: 공지사항 리스트를 보여주는 컴포넌트를 List 폴더 내부로 이동
hwinkr Nov 17, 2023
82cd9c2
refactor: 리스트를 가져올 때 까지 렌더링 되는 스켈레톤 컴포넌트 파일 경로 이동
hwinkr Nov 17, 2023
4ac02d2
Merge pull request #283 from GDSC-PKNU-Official/refactor/#282
hwinkr Nov 17, 2023
4eff240
chore(add FAQ page): FAQ 페이지 라우팅 추가
hwinkr Nov 18, 2023
fe895a6
chore(add icon): arrowRight 아이콘 추가
hwinkr Nov 18, 2023
f5af4a4
feat(add component): FAQ 컴포넌트 구현
hwinkr Nov 18, 2023
e75beff
config(add constants): FAQ 페이지 구현에 사용되는 상수 설정
hwinkr Nov 18, 2023
552b767
feat(add page): FAQ 페이지 구현
hwinkr Nov 18, 2023
5a6c450
chore(combine export): FAQ 관련 상수들 한번에 export
hwinkr Nov 18, 2023
493617c
chore(change constants name): FAQ_CONSTANTS 상수 객체 오타 수정
hwinkr Nov 19, 2023
4a5033e
Merge pull request #285 from GDSC-PKNU-Official/feat/#284
hwinkr Nov 19, 2023
da26a77
chore(delete unused images): 사용하지 않는 이미지들 삭제
hwinkr Nov 27, 2023
57fd0e3
chore(upload png images): 브라우저가 webp 확장자를 지원하지 않을 경우 사용 할 png 이미지 업로드
hwinkr Nov 27, 2023
ec3fba0
chore(upload webp images): TipCard 에서 사용할 백경이 webp 이미지 업로드
hwinkr Nov 27, 2023
383dcb4
chore(delete sidebar): 사용하지 않도록 결정 한 사이드 바 삭제
hwinkr Nov 27, 2023
2a5183b
chore(add path type): 꿀팁 페이지 경로에 type 경로 파라미터 추가
hwinkr Nov 27, 2023
30262e5
chore(delete unused file): 사용하지 않는 파일 삭제
hwinkr Nov 27, 2023
98639c5
chore(modify image size): 재사용하는 이미지 컴포넌트의 'tiny' 사이즈 변경
hwinkr Nov 27, 2023
7a0b4e7
feat(compound component): 팁 카드 컴포넌트에 합성 컴포넌트 적용
hwinkr Nov 27, 2023
617e656
feat(TipImage): 팁 카드 컴포넌트에서 사용할 팁 이미지 컴포넌트 구현
hwinkr Nov 27, 2023
05c27c2
feat(TipSubTitle): 팁 카드 컴포넌트에서 사용할 팁 소제목 컴포넌트 구현
hwinkr Nov 27, 2023
0634a15
feat(TipTitle): 팁 카드 컴포넌트에서 사용할 팁 제목 컴포넌트 구현
hwinkr Nov 27, 2023
9deaccf
feat(util function): 팁 카드 합성 컴포넌트에서 렌더링 할 자식 컴포넌트를 결정하는 함수 구현
hwinkr Nov 27, 2023
6ad84b3
refactor(Header): 홈페이지에서는 뒤로가기 버튼을 렌더링하지 않도록 변경
hwinkr Nov 27, 2023
1cff18c
feat(InformUpperLayout): 정보를 보여주는 페이지의 상단 레이아웃을 공통 컴포넌트로 구현
hwinkr Nov 27, 2023
f8b3f67
feat(InformSubTitle): 정보 페이지 상단 레이아웃 컴포넌트에서 사용할 소제목 컴포넌트 구현
hwinkr Nov 27, 2023
06159ce
feat(InformTitle): 정보 페이지 상단 레이아웃 컴포넌트에서 사용할 제목 컴포넌트 구현
hwinkr Nov 27, 2023
c9844aa
feat(InformTypeButton): 정보 페이지 상단 레이아웃 컴포넌트에서 사용할 버튼 컴포넌트 구현
hwinkr Nov 27, 2023
34806d6
feat(util function): 정보 페이지 상단 레이아웃 합성 컴포넌트에서 렌더링 할 자식 컴포넌트를 결정하는 함수 구현
hwinkr Nov 27, 2023
940f65f
feat(TipCardList): 팁 카드들을 모두 렌더링하는 컴포넌트 구현
hwinkr Nov 27, 2023
6bf3166
config(add tip path): 경로를 상수로 관리하는 PATH 객체에 tip 페이지 경로 추가
hwinkr Nov 27, 2023
ce845c1
config(modify tip constants): 꿀팁 페이지에서 사용할 데이터 및 상수 설정
hwinkr Nov 27, 2023
19b2d53
refactor(modify tip page): 팁 페이지 스타일 수정, 합성 컴포넌트 적용
hwinkr Nov 27, 2023
c9b2f7f
chore(modify typo): TipCarList -> TipCardList 오타 수정
hwinkr Nov 27, 2023
26f2b58
chore(add readonly): 객체 불변성을 유지하기 위한 readonly 추가
hwinkr Nov 28, 2023
2f1c3fc
Merge branch 'dev' into style/#286
hwinkr Nov 28, 2023
aaa8138
Merge pull request #287 from GDSC-PKNU-Official/style/#286
hwinkr Nov 28, 2023
cf29e67
fix(Carousel): 웨일비 캐러셀에 모집기관과 운영기간을 나눠서 보여주도록 변경
pp449 Nov 29, 2023
80910bf
chore(delete unused component): 사용하지 않는 컴포넌트 삭제
hwinkr Nov 30, 2023
4059469
chore(modify image demension): 팁 페이지에서 사용할 백경이 png 이미지 변경
hwinkr Dec 1, 2023
888288f
chore(modify image demension): 팁 페이지에서 사용할 백경이 webp 이미지 변경
hwinkr Dec 1, 2023
d81b08c
chore(add icon): 아래방향 화살표, 학교 빌딩 아이콘 추가
hwinkr Dec 1, 2023
69de644
refactor(modify icon type): 컴포넌트에서 사용되는 아이콘 타입 변경
hwinkr Dec 1, 2023
de84e25
refactor(edit test code): 컴포넌트에서 사용하는 아이콘이 변경되어, 테스트 코드 수정
hwinkr Dec 1, 2023
53688cc
refactor(modify icon animation): 사용자가 FAQ를 클릭할 경우 적용됐던 화살표 아이콘 애니메이션 …
hwinkr Dec 1, 2023
1f6530b
feat(add InformSearchForm): 합성 컴포넌트 구성에 InformSearchForm 컴포넌트 추가
hwinkr Dec 1, 2023
dd24137
feat(InformSearchForm): 정보를 검색할 수 있는 검색바 컴포넌트 구현
hwinkr Dec 1, 2023
4c454ef
refactor(add InformSearchForm): children 컴포넌트들의 타입을 확인하는 함수에 검색 바 컴포넌…
hwinkr Dec 1, 2023
3ac931f
refactor(remove boundaryLine): 공지사항 리스트 컴포넌트에서 BoundaryLine 컴포넌트 삭제
hwinkr Dec 1, 2023
5f90f7e
chore(modify image import path): 팁 페이지에서 사용할 이미지 import 경로 수정
hwinkr Dec 1, 2023
5289959
refactor(use compound component): 공지사항 컨테이너 컴포넌트에서 상단 레이아웃 합성 컴포넌트를 적용
hwinkr Dec 1, 2023
4a4b806
chore(delete unused component): 사용하지 않는 컴포넌트 export 경로에서 제거
hwinkr Dec 1, 2023
a1cce3d
chore(edit usage icon): 학교, 학과 공지사항 카드 컴포넌트에서 사용되는 아이콘 구분
hwinkr Dec 1, 2023
4f6c3b0
refactor(use compound component): FAQ 페이지에 상단 레이아웃 합성 컴포넌트 적용
hwinkr Dec 1, 2023
49da021
Merge pull request #291 from GDSC-PKNU-Official/fix/#290
pp449 Dec 1, 2023
8886947
chore(delete unused css code): 적용되지 않는 css 코드 제거
hwinkr Dec 1, 2023
174ec9b
chore(delete unused module): 사용하지 않는 모듈 제거
hwinkr Dec 1, 2023
33e7ab0
chore(modify css code): 불필요한 margin 제거
hwinkr Dec 1, 2023
6d43064
Merge pull request #292 from GDSC-PKNU-Official/refactor/#289
hwinkr Dec 3, 2023
4cdc86d
chore(delete graduation link): useMajor 훅에서 삭제된 졸업요건 링크 반영
hwinkr Dec 11, 2023
4ebf349
refactor(delete graduation state): MajorContext에서 졸업요건 링크 상태 삭제
hwinkr Dec 11, 2023
29a095f
refactor(delete graduation type): MajorContext 타입에서 졸업요건 링크 타입 삭제
hwinkr Dec 11, 2023
bcca8d6
refactor(add graduation handle logic): 졸업요건 카드를 클릭할 때마다 졸업요건 링크 api 요…
hwinkr Dec 11, 2023
90efaca
Merge pull request #295 from GDSC-PKNU-Official/refactor/#294
hwinkr Dec 12, 2023
5878b50
chore(delete unused modals): 사용하지 않는 모달 삭제
hwinkr Dec 22, 2023
be8ddbb
refactor(modify modal): 모달 렌더링 테스트 시 변경된 합성 컴포넌트를 적용 하도록 수정
hwinkr Dec 22, 2023
7b327c8
refactor(modify modal type): 모달 타입 수정
hwinkr Dec 22, 2023
f949c81
chore(modify code line): Circle 인터페이스 위치 수정
hwinkr Dec 22, 2023
cb2ed24
feat(modal compound component): 모달을 합성 컴포넌트로 구현
hwinkr Dec 22, 2023
4f71ca7
feat(modal button): 모달 버튼 컴포넌트 구현
hwinkr Dec 22, 2023
ca65ae1
feat(modal title): 모달 제목 컴포넌트 구현
hwinkr Dec 22, 2023
525d46f
feat(check modal children): 렌더링 할 모달 컴포넌트들을 확인하는 유틸 함수 구현
hwinkr Dec 22, 2023
26a8ed7
refactor(modify modal logic): 변경된 모달 합성 컴포넌트 적용
hwinkr Dec 22, 2023
2a2c294
chore(add null type): 위치 확인 권한을 허용하는지 확인하는 함수의 인자의 타입에 null 추가
hwinkr Dec 22, 2023
f7130af
chore(add component): export 경로 관리 파일에서 PknuMap 컴포넌트 추가
hwinkr Dec 22, 2023
0c7958f
refactor(modify rendering logic): 모달 렌더링 로직 수정
hwinkr Dec 22, 2023
b2628c0
feat(map context): 지도 페이지 내부에서 사용 할 지도 Context 추가
hwinkr Dec 22, 2023
daf2507
feat(userLocation context): 지도 페이지 내부에서 사용 할 사용자 위치 Context 추가
hwinkr Dec 22, 2023
2501192
feat(custom hook): 렌더링 할 커스텀 오버레이(건물 번호)들을 결정하는 로직을 커스텀 훅으로 구현
hwinkr Dec 22, 2023
af5cbea
feat(custom hook): 지도 컨텍스트를 사용하기 위한 커스텀 훅 구현
hwinkr Dec 22, 2023
4e78bc5
feat(custom hook): 사용자 위치 컨텍스트를 사용하기 위한 커스텀 훅 구현
hwinkr Dec 22, 2023
9cf0a86
refactor(modify custom hook logic): 모달 타입의 변경으로 커스텀 훅 로직 수정
hwinkr Dec 22, 2023
342e477
chore(add empty line): 공백 코드 라인 추가
hwinkr Dec 22, 2023
0e8d142
feat(MapProvider): 지도, 사용자 위치, 커스텀 오버레이 로직 의존성 주입을 위한 프로바이더 컴포넌트 구현
hwinkr Dec 22, 2023
1a7ba36
refactor(modify arguments): 지도 위 커스텀 오버레이(건물 번호)들을 관리하는 클래스에 전달하는 인자 수정
hwinkr Dec 22, 2023
ef02376
refactor(modify handle overlay logic): 커스텀 오버레이(건물 번호)를 관리하는 클래스 로직 수정
hwinkr Dec 22, 2023
1aaba9d
refactor(FilterButtons): 렌더링 할 건물 번호를 결정하는 버튼 컴포넌트 로직 수정
hwinkr Dec 22, 2023
976c739
chore(change component name): Map -> MapPage 라우팅 컴포넌트 이름 수정
hwinkr Dec 22, 2023
e9dd4cd
refactor(MapPage): context api와 합성 컴포넌트를 사용해서 의존성 주입을 하도록 수정
hwinkr Dec 22, 2023
a66714b
refactor(MapHeader): 커스텀 훅으로 의존성을 받아오고, 건물을 찾는 함수를 유틸 함수로 분리
hwinkr Dec 22, 2023
ae0ebe4
refactor(PknuMap): props가 아닌 커스텀 훅으로 의존성을 받아오는 것으로 변경
hwinkr Dec 22, 2023
61318b5
refactor(RefreshButtons): props가 아닌 커스텀 훅으로 의존성을 받아오는 것으로 변경
hwinkr Dec 22, 2023
cea93ff
chore(disunite util function): 건물을 찾는 함수를 유틸 함수로 분리
hwinkr Dec 22, 2023
8374227
feat(Icon): 아이콘 추가
pp449 Dec 23, 2023
6a7eb68
style(theme): 어두운 검은색 추가 및 기본 색상 변경
pp449 Dec 23, 2023
28ffd71
feat(InformHalfCardList): 홈 화면에 추가될 half card 컴포넌트 구현
pp449 Dec 23, 2023
798e03b
feat(pages/Home): 홈 화면에 HalfCard 컴포넌트 추가
pp449 Dec 23, 2023
86d6934
fix(tip): readonly 타입 제거
pp449 Dec 23, 2023
3d3b677
feat(constants/announcement, InformSearchForm): 어학, 채용을 상수에 추가
pp449 Dec 23, 2023
4a006e9
fix(suspense/fetch-announce-list): 서버에 요청할 엔드포인트 문자열을 직접 매개변수로 받도록 변경
pp449 Dec 23, 2023
0b32985
feat(Announcement): 어학 공지사항 페이지를 라우팅 경로에 추가
pp449 Dec 23, 2023
9f8688e
refactor(add suggestion page): 건의사항 페이지 라우팅 추가
hwinkr Dec 23, 2023
fd8d5d5
feat(post suggestion function): 건의사항을 보내는 api 함수 분리
hwinkr Dec 23, 2023
0d59aad
feat(SuggestionPage): 건의사항 페이지 구현
hwinkr Dec 23, 2023
eb89fdb
chore(change method): 건물 검색 키워드를 포매팅할 때, replaceAll 메서드를 사용하는 것으로 변경
hwinkr Dec 24, 2023
072c8a0
Merge pull request #296 from GDSC-PKNU-Official/refactor/#293
hwinkr Dec 24, 2023
8ba3282
refactor(InformHalfCard): 컴포넌트 이름을 InformHalfCardList -> InformHalfCa…
pp449 Dec 28, 2023
d98b449
Merge pull request #299 from GDSC-PKNU-Official/feat/#298
hwinkr Dec 28, 2023
1f840f0
Merge pull request #297 from GDSC-PKNU-Official/feat/#264
pp449 Dec 28, 2023
68e5948
chore(change modal code): 건의사항 페이지에서 사용하는 모달을 합성 컴포넌트로 변경
hwinkr Dec 28, 2023
3ff3f68
Merge pull request #301 from GDSC-PKNU-Official/chore/#300
hwinkr Dec 28, 2023
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
Binary file removed public/assets/baekgyeong-speaker.png
Binary file not shown.
Binary file removed public/assets/baekgyeong-whalebe.png
Binary file not shown.
Binary file removed public/assets/pknu.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/tipImages/png/baekgyeong_guide.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/tipImages/png/baekgyeong_hi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/tipImages/png/baekgyeong_love.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/tipImages/png/baekgyeong_teach.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/tipImages/png/pknu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added public/assets/tipImages/webp/baekgyeong_hi.webp
Binary file not shown.
Binary file added public/assets/tipImages/webp/baekgyeong_love.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added public/assets/tipImages/webp/pknu.webp
Binary file not shown.
11 changes: 11 additions & 0 deletions src/@types/announcement.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import {
ANNOUNCEMENT_CATEGORY,
ANNOUNCEMENT_TYPE,
} from '@constants/announcement';

type AnnounceItemType = '고정' | '일반';

export interface AnnounceItem {
Expand All @@ -11,3 +16,9 @@ export interface AnnounceItem {
export type AnnounceItemList = {
[key in AnnounceItemType]: AnnounceItem[];
};

export type AnnouncementCategory =
(typeof ANNOUNCEMENT_CATEGORY)[keyof typeof ANNOUNCEMENT_CATEGORY];

export type AnnouncementType =
(typeof ANNOUNCEMENT_TYPE)[keyof typeof ANNOUNCEMENT_TYPE];
5 changes: 1 addition & 4 deletions src/@types/modals.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { modals } from '@hooks/useModals';

export type Modals =
| Array<{
Component: (typeof modals)[keyof typeof modals];
props: object;
Component: React.ReactElement<{ chidren: React.ReactNode }>;
}>
| [];
7 changes: 6 additions & 1 deletion src/@types/styles/icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ export type IconKind =
| 'menu'
| 'notification'
| 'school'
| 'schoolBuilding'
| 'arrowRight'
| 'arrowDown'
| 'arrowBack'
| 'plus'
| 'edit'
Expand All @@ -22,4 +25,6 @@ export type IconKind =
| 'checkedRadio'
| 'uncheckedRadio'
| 'location'
| 'warning';
| 'warning'
| 'account'
| 'language';
20 changes: 10 additions & 10 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
import BodyLayout from '@components/BodyLayout';
import FooterTab from '@components/FooterTab';
import Header from '@components/Header';
import Announcement from '@pages/Announcement';
import BodyLayout from '@pages/BodyLayout';
import FAQPage from '@pages/FAQ';
import Home from '@pages/Home';
import MajorDecision from '@pages/MajorDecision';
import Map from '@pages/Map';
import MapProvider from '@pages/Map/Provider';
import MapPage from '@pages/Map';
import My from '@pages/My';
import SuggestionPage from '@pages/Suggestion';
import Tip from '@pages/Tip';
import RouteChangeTracker from '@utils/routeChangeTracker';
import { Routes, Route, useLocation } from 'react-router-dom';
import { Routes, Route } from 'react-router-dom';

const App = () => {
const location = useLocation();
RouteChangeTracker();

return (
<>
{location.pathname !== '/map' && <Header />}
<Header />
<Routes>
<Route element={<BodyLayout />}>
<Route path="/" element={<Home />} />
<Route path="/announcement/*" element={<Announcement />} />
<Route path="/major-decision/*" element={<MajorDecision />} />
<Route path="/my" element={<My />} />
<Route path="/tip" element={<Tip />} />
</Route>
<Route element={<MapProvider />}>
<Route path="/map" element={<Map />} />
<Route path="/tip/:type" element={<Tip />} />
<Route path="/FAQ" element={<FAQPage />} />
<Route path="/suggestion" element={<SuggestionPage />} />
</Route>
<Route path="/map" element={<MapPage />} />
</Routes>
<FooterTab />
</>
Expand Down
5 changes: 2 additions & 3 deletions src/apis/Suspense/fetch-announce-list.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import Major from '@type/major';
import { AxiosResponse } from 'axios';

import wrapPromise from './wrap-promise';
import http from '../http';

const fetchAnnounceList = <T>(major: Major) => {
const fetchAnnounceList = <T>(endPoint: string) => {
const promise: Promise<AxiosResponse<T>> = http
.get(major ? `/api/announcement?major=${major}` : `/api/announcement`)
.get(`/api/announcement` + endPoint)
.then((res) => res.data);

return wrapPromise<T>(promise);
Expand Down
18 changes: 18 additions & 0 deletions src/apis/suggestion/post-suggestion.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import http from '@apis/http';
import { SERVER_URL } from '@config/index';

const postSuggestion = async (value: string | undefined) => {
await http.post(
`${SERVER_URL}/api/suggestion`,
{
content: value,
},
{
headers: {
'Content-Type': 'application/json',
},
},
);
};

export default postSuggestion;
File renamed without changes.
42 changes: 0 additions & 42 deletions src/components/Card/AnnounceCard/AnnounceList/index.tsx

This file was deleted.

8 changes: 7 additions & 1 deletion src/components/Card/AnnounceCard/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import http from '@apis/http';
import MajorProvider from '@components/Providers/MajorProvider';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { AnnounceItemList } from '@type/announcement';
Expand Down Expand Up @@ -34,7 +35,12 @@ describe('공지사항 카드 컴포넌트 테스트', () => {
const { 고정, 일반 } = announceList;

일반.forEach(async (annouce) => {
render(<AnnounceCard {...annouce} />, { wrapper: MemoryRouter });
render(
<MajorProvider>
<AnnounceCard {...annouce} />
</MajorProvider>,
{ wrapper: MemoryRouter },
);
});

const annouceCards = screen.getAllByTestId('card');
Expand Down
93 changes: 48 additions & 45 deletions src/components/Card/AnnounceCard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,93 +1,96 @@
import Icon from '@components/Icon';
import { css } from '@emotion/react';
import styled from '@emotion/styled';
import useMajor from '@hooks/useMajor';
import { THEME } from '@styles/ThemeProvider/theme';
import { AnnounceItem } from '@type/announcement';
import openLink from '@utils/router/openLink';

interface AnnounceCardProps extends AnnounceItem {
pinned?: boolean;
author?: string;
}

const AnnounceCard = ({
title,
link,
uploadDate,
pinned = false,
author,
}: AnnounceCardProps) => {
const onClick = () => {
window.open(link, '_blank');
};
const { major } = useMajor();

uploadDate = uploadDate.slice(2);

return (
<Card onClick={onClick} data-testid="card">
<Card onClick={() => openLink(link)} data-testid="card">
<ContentContainer>
{pinned && <Icon kind="speaker" color={THEME.PRIMARY} />}
<AnnounceTitle pinned={pinned}>{title}</AnnounceTitle>
<VertialSeparator
css={css`
border-left: 1px solid gray;
height: 12px;
margin: 0 5px;
`}
/>
<AnnounceDate>{uploadDate}</AnnounceDate>
<AnnounceTitle>{title}</AnnounceTitle>
<SubContent>
<AnnounceDate>20{uploadDate}</AnnounceDate>
<VertialBoundaryLine />
<Source>{author ? author : major}</Source>
</SubContent>
</ContentContainer>
<HorizonBoundaryLine />
</Card>
);
};

export default AnnounceCard;

const Card = styled.div`
height: 28px;
padding: 10px;
min-height: 50px;
display: flex;
flex-direction: column;
justify-content: center;

color: ${THEME.TEXT.BLACK};

transition: 0.3s;
&:active {
transform: scale(0.95);
opacity: 0.6;
}
`;

const ContentContainer = styled.div`
padding: 20px 0 20px 0;
display: flex;
align-items: center;
line-height: 1.5;
flex-direction: column;

gap: 10px;
`;

const AnnounceTitle = styled.span<{ pinned: boolean }>`
const AnnounceTitle = styled.span`
display: flex;
align-items: center;
flex: 9;
font-size: 15px;
font-weight: ${({ pinned }) => (pinned ? 'bold' : 500)};
margin-left: ${({ pinned }) => (pinned ? '' : '28px')};

white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;

&: hover {
cursor: pointer;
}

transition: 0.3s;
&:active {
transform: scale(0.95);
opacity: 0.6;
}
font-size: 16px;
font-weight: 500;
`;

const VertialSeparator = styled.div`
const VertialBoundaryLine = styled.div`
border-left: 1px solid gray;
height: 12px;
margin: 0 5px;
`;

const AnnounceDate = styled.span`
flex: 1;
font-size: 10px;
font-weight: bold;
text-align: end;
font-size: 13px;
white-space: nowrap;

color: ${THEME.TEXT.GRAY};
padding-right: 5px;
`;

const HorizonBoundaryLine = styled.div`
border-bottom: 1px solid ${THEME.BACKGROUND};
`;

const SubContent = styled.div`
display: flex;
align-items: center;
`;

const Source = styled.div`
font-size: 13px;
color: gray;
padding-left: 5px;
`;
Loading