Skip to content

Commit d9c9f53

Browse files
kimnamheeeec0912jy
andauthored
3주차 배포 (#69)
* 🧹 chore: add tanstack router plugins * ✨ feat(routes): integrate tanstack router * ✨ feat(routes): add basic routes profile, explore, login * 🧹 chore(eslint): add ignore for shared/ui * ✨ feat(components): add sidebar component * 🧹 chore(asset): add instagram logo * 💎 style(index): initialize style * ✨ feat(route): add /me to route * ✨ feat(provider): add sidebar provider * ✨ feat(route): configure provider * ✨ feat(components): add sidebar navigation item component * ✨ feat(component): add sidebar component * ✨ feat(routes): separate homepage component * ✨ feat(components): add drawer component * ✨ feat(components): add dialog component * ✨ feat(components): add action, type to navItems * ✨ feat(components): add app level modal, drawer * ✨ feat(components): open drawer on search click, open modal on create click * 로그인 페이지 UI 구현 * 비밀번호 찾기 화면 구현 * 계정 생성 UI 및 비밀번호 생성 로직 구현 * 로그인 메인화면 가입하기 버튼 버그 수정 * ✨ feat(components): add create post modal component * package-lock.json 삭제 * ✨ feat(components): add sonner * ✨ feat(provider): integrate toaster * ✨ feat(components): add dropzone component * ✨ feat(components): integrate drag and drop to createmodal * ♻️ refactor(components): separate logic using custom hook * ♻️ refactor(components): separate ui components * ✨ feat(components): add post details pane * ✨ feat(components): add double modal on exit * 🧹 chore: add testing library * 🧪 test(createmodal): add create post modal related tests * ✨ feat(components): add profile header * ✨ feat(api): initialize ky instance * ✨ feat(components): add tabs * ✨ feat(routes): separate app route layer * ✨ feat(routes): update route tree * ✨ feat(components): add fallback image * ✨ feat(profile-posts): add grid ui * ✨ feat(profilepage): add posts grid ui * 🧹 chore(homepage): remove duplicate navigation shell * ♻️ refactor(profilepage): add common style container component * ✨ feat(profile): add profile page component * ✨ feat(navigation): add useNavController hook * 🧹 chore: rerun yarn install * ✨ feat(msw): msw 기본 설정 * ✨ feat(components): add carousel * ♻️ refactor(sidebar): collapse sidebar below xl * ✨ feat(components): add stories field * ✨ feat(stories): add link to story route * ✨ feat: msw 구조 수정 * ✨ feat: msw post db 업데이트 및 기본 레이아웃 구현 * ✨ feat: 사진 기본 ui 구현 * ✨ feat: 하트 색깔 및 불투명도 수정 * ✨ feat: 하트 올라가는 애니메이션 구현 * ✨ feat: 하트 애니메이션 구체화 및 버그 수정 * ✨ feat(msw): add common response type * 🐛 fix(msw): fix common response type field name * ✨ feat(msw): add mock users * ✨ feat(msw): add follow handlers * 💎 style(sidebar): add padding * ✨ feat(components): add follow list modal component needs to be fixed based on real api * ✨ feat(components): add mock data / match data type * 💎 style(search): adjust search drawer style * ✨ feat: ... (설정) 화면 모달 구현 * ✨ feat(search): apply debounce to input value * ✨ feat: msw 구현 (comment) * 🧹 chore: remove duplicate key * ✨ feat: 댓글 ui * ✨ feat: 댓글 설정창(...) ui 구현 * ✨ feat: ... 모달 로직 수정 * ✨ feat: 글 본문 및 프로필 ui 수정 (여백 정리) * ✨ feat(msw): warn unhandled requests for debugging * ✨ feat(gitignore): add env * ✨ feat(providers): add query client provider * ✨ feat(api): add test (health check) handler * ✨ feat(route): add test route for api connection test * ✨ feat: 액션 바 (상호작용) ui 구현 * ✨ feat: env 삭제 * 💎 style(sidebar): update layout stability * ✨ feat(sidebar): updage search drawer toggle logic * ✨ feat(sidebar): remain page width when opening search drawer * ✨ feat(components): add pagination * ✨ feat(components): add shared components lazyimage / card * ✨ feat(msw): add post mock data * ✨ feat(api): add feed schema / types * ✨ feat(api): add handler / api function * ✨ feat(home): add feed ui * ✨ feat(actions): add env variable on cd workflow * 💎 style(sidebar): collapse sidebar on search drawer toggle * 🐛 fix(route): update route from profile_id to post_id * ✨ feat(feed): link to post detail on click * ✨ feat(components): add dropdown * ✨ feat(msw): add album handler * ✨ feat(api): add album api call functions * ✨ feat(api): add album api call function * 🐛 fix(msw): adjust handler order * 💎 style(dropdown): remove circle icon * ✨ feat(album): add album dropdown * 🧪 test(album): add album dropdown tests * 🐛 fix(actions): apply secrets * 🧹 chore: update test:ci command option * ✨ feat(msw): add bookmarks handler * ✨ feat(bookmarks): add bookmarked posts ui * ✨ feat(postdetail): return to previous page when closing page * ✨ feat(postdetail): validate search params with zod * ✨ feat: 하단 푸터 - 위치 화면 구현 * ✨ feat: 하단 푸터 수정 (Instagram Lite 추가) * ✨ feat: 푸터 완성 * ✨ feat: 푸터 ui, 기능, 경로 설정 완성 --------- Co-authored-by: c0912jy <c0912jy@gmail.com>
1 parent 60669a0 commit d9c9f53

File tree

86 files changed

+5055
-135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+5055
-135
lines changed

.github/workflows/cd.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
run: yarn install --frozen-lockfile
2525

2626
- name: Build project
27+
env:
28+
VITE_API_URL: ${{ secrets.VITE_API_URL }}
2729
run: yarn build
2830

2931
- name: Configure AWS credentials

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,13 @@ jobs:
3030
run: yarn type-check
3131

3232
- name: Run tests (Vitest)
33+
env:
34+
VITE_API_URL: ${{ secrets.VITE_API_URL }}
3335
run: yarn test:ci
3436

3537
- name: Build project
38+
env:
39+
VITE_API_URL: ${{ secrets.VITE_API_URL }}
3640
run: yarn build
3741

3842
- name: Comment on PR (CI Result)

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ dist-ssr
2222
*.njsproj
2323
*.sln
2424
*.sw?
25+
26+
.env

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"prepare": "husky",
1515
"commit": "cz",
1616
"test": "vitest",
17-
"test:ci": "vitest run"
17+
"test:ci": "vitest run --reporter=verbose --silent"
1818
},
1919
"lint-staged": {
2020
"*.{ts,tsx,js,jsx}": [
@@ -27,6 +27,7 @@
2727
},
2828
"dependencies": {
2929
"@radix-ui/react-dialog": "^1.1.15",
30+
"@radix-ui/react-dropdown-menu": "^2.1.16",
3031
"@radix-ui/react-separator": "^1.1.8",
3132
"@radix-ui/react-slot": "^1.2.4",
3233
"@radix-ui/react-tabs": "^1.1.13",

src/app/providers/Providers.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@ import { ThemeProvider } from 'next-themes'
44

55
import { SidebarProvider } from '@/shared/ui/sidebar'
66
import { Toaster } from '@/shared/ui/sonner'
7+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
8+
9+
const queryClient = new QueryClient()
710

811
export function Providers({ children }: PropsWithChildren) {
912
return (
10-
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
11-
<SidebarProvider>{children}</SidebarProvider>
12-
<Toaster duration={1500} className="text-center" />
13-
</ThemeProvider>
13+
<QueryClientProvider client={queryClient}>
14+
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
15+
<SidebarProvider>{children}</SidebarProvider>
16+
<Toaster duration={1500} className="text-center" />
17+
</ThemeProvider>
18+
</QueryClientProvider>
1419
)
1520
}

src/assets/google-play-badge.png

7.9 KB
Loading

src/assets/instagram-icon.png

6.49 KB
Loading

src/assets/pin.png

744 Bytes
Loading
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
import instagramLogo from '../../assets/instagram-logo.svg'
2+
import pinIcon from '../../assets/pin.png'
3+
import { CITIES } from '../../constants/cities'
4+
5+
interface CitySelectViewProps {
6+
country: string
7+
onLoginClick: () => void
8+
onSignupClick: () => void
9+
}
10+
11+
const CitySelectView = ({
12+
country,
13+
onLoginClick,
14+
onSignupClick,
15+
}: CitySelectViewProps) => {
16+
return (
17+
<div className="flex w-full flex-col items-center">
18+
<div className="fixed top-0 left-0 z-50 flex h-[60px] w-full justify-center border-b border-gray-300 bg-white px-4">
19+
<div className="flex w-full max-w-[935px] items-center justify-between">
20+
<img
21+
src={instagramLogo}
22+
alt="Instagram"
23+
className="w-[103px] cursor-pointer"
24+
onClick={onLoginClick}
25+
/>
26+
<div className="flex items-center gap-4">
27+
<button
28+
onClick={onLoginClick}
29+
className="rounded-[8px] bg-[#4a5df9] px-4 py-1.5 text-sm font-semibold text-white"
30+
>
31+
로그인
32+
</button>
33+
<button
34+
onClick={onSignupClick}
35+
className="text-sm font-semibold text-[#4a5df9]"
36+
>
37+
가입하기
38+
</button>
39+
</div>
40+
</div>
41+
</div>
42+
43+
<div className="mt-32 mb-12 flex w-11/24 flex-col">
44+
<div className="mb-10 flex items-center gap-2">
45+
<img
46+
src={pinIcon}
47+
alt="Location"
48+
className="h-4 w-4 object-contain"
49+
/>
50+
<span className="text-[16px] leading-none font-bold text-black">
51+
{country}
52+
</span>
53+
</div>
54+
<div className="mb-5 text-left">
55+
<span className="text-[12px] font-bold text-[#737373] uppercase">
56+
{country}의 도시
57+
</span>
58+
</div>
59+
<div className="flex flex-col rounded-[3px] border border-gray-300 bg-white shadow-sm">
60+
<div className="p-8">
61+
<div className="grid grid-cols-4 gap-x-8 gap-y-5">
62+
{CITIES.map((city, index) => (
63+
<div
64+
key={`${city}-${index}`}
65+
className="cursor-pointer truncate text-[14px] text-black active:text-[#4a5df9]"
66+
>
67+
{city}
68+
</div>
69+
))}
70+
</div>
71+
</div>
72+
</div>
73+
</div>
74+
</div>
75+
)
76+
}
77+
78+
export default CitySelectView
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import instagramIcon from '../../assets/instagram-icon.png'
2+
import googlePlayBadge from '../../assets/google-play-badge.png'
3+
4+
interface LiteDownloadViewProps {
5+
onBack: () => void
6+
}
7+
8+
const LiteDownloadView = ({ onBack }: LiteDownloadViewProps) => {
9+
return (
10+
<div className="flex w-full flex-col items-center justify-center px-4 pt-40 text-center tracking-tighter">
11+
<img
12+
src={instagramIcon}
13+
alt="Instagram"
14+
className="mb-4 h-16 w-16 cursor-pointer object-contain"
15+
onClick={onBack}
16+
/>
17+
18+
<h1 className="mb-[6px] text-[22px] font-bold text-black">
19+
Instagram Lite 다운로드
20+
</h1>
21+
22+
<p className="mb-[20px] text-[16px] text-black">
23+
더 가볍고 빠르며 데이터도 절약할 수 있습니다
24+
</p>
25+
26+
<div className="flex w-full flex-col items-center">
27+
<button className="mb-[7px] flex w-full max-w-[130px] items-center justify-center gap-2 rounded-[8px] bg-[#4a5df9] py-3 text-[13px] font-semibold tracking-tighter text-white transition-opacity hover:opacity-90">
28+
<svg
29+
width="15"
30+
height="15"
31+
viewBox="0 0 24 24"
32+
fill="none"
33+
stroke="currentColor"
34+
strokeWidth="2.5"
35+
strokeLinecap="round"
36+
strokeLinejoin="round"
37+
>
38+
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
39+
<polyline points="7 10 12 15 17 10" />
40+
<line x1="12" y1="15" x2="12" y2="3" />
41+
</svg>
42+
APK 다운로드
43+
</button>
44+
</div>
45+
46+
<div className="cursor-pointer">
47+
<img
48+
src={googlePlayBadge}
49+
alt="Google Play"
50+
className="h-12 object-contain"
51+
/>
52+
</div>
53+
</div>
54+
)
55+
}
56+
57+
export default LiteDownloadView

0 commit comments

Comments
 (0)