Skip to content

Commit e0a0896

Browse files
authored
feat: Ver 2.2.0 작품 둘러보기 css 구현 (#151)
1 parent 967788c commit e0a0896

File tree

17 files changed

+1378
-30
lines changed

17 files changed

+1378
-30
lines changed

package-lock.json

Lines changed: 628 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,15 @@
5353
]
5454
},
5555
"devDependencies": {
56+
"@tailwindcss/postcss": "^4.1.4",
5657
"@types/js-cookie": "^3.0.6",
5758
"@types/node": "^22.10.8",
5859
"@types/react": "^19.0.7",
5960
"@types/react-dom": "^19.0.3",
6061
"@vitejs/plugin-react": "^4.3.4",
62+
"autoprefixer": "^10.4.21",
63+
"postcss": "^8.5.3",
64+
"tailwindcss": "^4.1.4",
6165
"typescript": "^5.7.3",
6266
"vite": "^6.0.7"
6367
}

postcss.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
plugins: {
3+
'@tailwindcss/postcss': {}, // ✅ 요걸로 바꿔야 해!
4+
autoprefixer: {},
5+
},
6+
};

src/App.jsx

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// App.jsx
12
import { BrowserRouter, Routes, Route } from "react-router-dom";
23

34
import DefaultLayout from "./layouts/DefaultLayout";
@@ -13,6 +14,7 @@ import SignIn from "./pages/auth/SignIn";
1314
import SignInV2 from "./pages/auth/SignInV2";
1415
import FindBar from "./pages/auth/FindBar";
1516
import List from "./pages/work/List";
17+
import PostList from "./pages/work/postList/PostGallery";
1618
import Detail from "./pages/work/Detail";
1719
import PostWork from "./pages/work/PostWork";
1820
import Purchase from "./pages/payment/Purchase";
@@ -56,14 +58,26 @@ function App() {
5658
<Route path="signin/v2" element={<SignInV2 />} />
5759
<Route path="signin/find/:id" element={<FindBar />} />
5860

61+
<Route path="post-list" element={<PostList />} />
62+
<Route path="post-list/detail/:id" element={<Detail />} />
63+
5964
<Route path="list" element={<List />} />
6065
<Route path="list/detail/:id" element={<Detail />} />
6166

62-
<Route path="purchase/:id" element={<ProtectedRoute element={<Purchase />} />} />
67+
<Route
68+
path="purchase/:id"
69+
element={<ProtectedRoute element={<Purchase />} />}
70+
/>
6371

6472
<Route element={<MarginLayout />}>
65-
<Route path="admin/scriptManage" element={<AdminSwitch page={0} />} />
66-
<Route path="admin/orderManage" element={<AdminSwitch page={1} />} />
73+
<Route
74+
path="admin/scriptManage"
75+
element={<AdminSwitch page={0} />}
76+
/>
77+
<Route
78+
path="admin/orderManage"
79+
element={<AdminSwitch page={1} />}
80+
/>
6781

6882
<Route path="policy/:id" element={<PolicyBar />} />
6983

@@ -73,7 +87,10 @@ function App() {
7387
path="purchase/success"
7488
element={<ProtectedRoute element={<PurchaseSuccess />} />}
7589
/>
76-
<Route path="purchase/abort" element={<ProtectedRoute element={<Abort />} />} />
90+
<Route
91+
path="purchase/abort"
92+
element={<ProtectedRoute element={<Abort />} />}
93+
/>
7794
<Route path="post" element={<PostWork />} />
7895

7996
<Route
22.2 KB
Loading
Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 14 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import React from "react";
2+
import { formatNumber } from "@/utils/formatNumber";
3+
import liekIcon from "./../../assets/image/post/list/ic-fill-heart.svg";
4+
import viewIcon from "./../../assets/image/post/list/ic-outline-eye.svg";
5+
6+
interface LikeViewCountProps {
7+
likes: number;
8+
views: number;
9+
}
10+
11+
function LikeViewCount({ likes, views }: LikeViewCountProps) {
12+
return (
13+
<div className="flex items-center text-basetext-black gap-[10px]">
14+
<div className="flex items-center gap-[5px]">
15+
<img
16+
src={liekIcon}
17+
alt="Like"
18+
className="flex-shrink-0 w-4 h-4 aspect-square"
19+
/>
20+
<span className="text-black text-[14px] font-normal leading-[20px] font-['Pretendard']">
21+
{formatNumber(likes)}
22+
</span>
23+
</div>
24+
<div className="flex items-center gap-[5px] ">
25+
<img
26+
src={viewIcon}
27+
alt="View"
28+
className="flex-shrink-0 w-4 h-4 aspect-square"
29+
/>
30+
<span className="text-black text-[14px] font-normal leading-[20px] font-['Pretendard']">
31+
{formatNumber(views)}
32+
</span>
33+
</div>
34+
</div>
35+
);
36+
}
37+
38+
export default LikeViewCount;

0 commit comments

Comments
 (0)