Skip to content

Commit cc5bda2

Browse files
authored
Merge pull request #99 from LimSB-dev/canary
canary to master (v1.9.0)
2 parents 242f8e9 + 5cc6228 commit cc5bda2

File tree

10 files changed

+332
-128
lines changed

10 files changed

+332
-128
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@
4242
"@vercel/blob": "^0.23.2",
4343
"@vercel/postgres": "^0.9.0",
4444
"@vercel/speed-insights": "^1.0.9",
45-
"axios": "^1.7.7",
45+
"axios": "^1.8.2",
4646
"bcrypt": "^5.1.1",
4747
"camelcase-keys": "^9.1.3",
4848
"editorjs-alert": "^1.1.3",
4949
"editorjs-html": "^3.4.3",
5050
"jest": "^29.7.0",
5151
"lodash": "^4.17.21",
52-
"next": "14.2.12",
52+
"next": "14.2.26",
5353
"next-auth": "^5.0.0-beta.4",
5454
"next-pwa": "^5.6.0",
5555
"react": "^18",

public/ads.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
google.com, pub-5392145622568260, DIRECT, f08c47fec0942fa0

src/components/main/card/PostCard/RecentPostCard/index.tsx

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,18 @@ import {
99
} from "@fortawesome/free-regular-svg-icons";
1010
import { faHeart as solidHeart } from "@fortawesome/free-solid-svg-icons";
1111
import { useAppSelector } from "@/hooks/reduxHook";
12-
1312
interface IProps {
1413
post: IPost;
1514
}
16-
1715
const RecentPostCard = ({ post }: IProps) => {
1816
const user = useAppSelector((state) => state.user);
1917
const date = new Date(post.createdAt);
20-
2118
const formattedDate = date.toLocaleDateString("ko-KR", {
2219
year: "numeric",
2320
month: "long",
2421
day: "numeric",
2522
timeZone: "UTC",
2623
});
27-
2824
return (
2925
<Link
3026
className={`button-card-shadow ${styles.card_resent}`}
@@ -33,19 +29,21 @@ const RecentPostCard = ({ post }: IProps) => {
3329
>
3430
<h6>{post.title}</h6>
3531
<div className={styles.item_footer}>
36-
{/* TODO: <p>tag</p> */}
3732
<caption>{formattedDate}</caption>
3833
<div className={styles.icon_container}>
39-
<FontAwesomeIcon
40-
icon={post.likes.includes(user.id) ? solidHeart : regularHeart}
41-
/>
42-
{post.likes.length}
43-
<FontAwesomeIcon icon={faEye} />
44-
{post.views}
34+
<div>
35+
<FontAwesomeIcon
36+
icon={post.likes.includes(user.id) ? solidHeart : regularHeart}
37+
/>
38+
{post.likes.length}
39+
</div>
40+
<div>
41+
<FontAwesomeIcon icon={faEye} />
42+
{post.views}
43+
</div>
4544
</div>
4645
</div>
4746
</Link>
4847
);
4948
};
50-
5149
export default RecentPostCard;

src/components/main/card/PostCard/RecentPostCard/styles.module.scss

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
display: flex;
33
flex-direction: column;
44
justify-content: space-between;
5-
align-items: center;
5+
align-items: flex-start;
66
padding: var(--card-padding);
77
width: calc(var(--card-width) * 2 + var(--gap) * 1);
88
height: calc(var(--card-height) * 4 + var(--gap) * 3);
@@ -23,7 +23,13 @@
2323
display: flex;
2424
justify-content: flex-end;
2525
align-items: center;
26-
gap: 4px;
27-
26+
gap: 8px;
2827
font-size: var(--caption);
28+
29+
div {
30+
display: flex;
31+
align-items: center;
32+
gap: 4px;
33+
width: 24px;
34+
}
2935
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
"use client";
2+
3+
import styles from "./styles.module.scss";
4+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
5+
import { faEye } from "@fortawesome/free-regular-svg-icons";
6+
import { faHeart } from "@fortawesome/free-regular-svg-icons";
7+
8+
const SkeletonPostCard = () => {
9+
const date = new Date();
10+
const formattedDate = date.toLocaleDateString("ko-KR", {
11+
year: "numeric",
12+
month: "long",
13+
day: "numeric",
14+
timeZone: "UTC",
15+
});
16+
17+
return (
18+
<div className={`button-card-shadow ${styles.card_resent}`}>
19+
<h6>Loading...</h6>
20+
<div className={styles.item_footer}>
21+
<caption>{formattedDate}</caption>
22+
<div className={styles.icon_container}>
23+
<div>
24+
<FontAwesomeIcon icon={faHeart} />0
25+
</div>
26+
<div>
27+
<FontAwesomeIcon icon={faEye} />0
28+
</div>
29+
</div>
30+
</div>
31+
</div>
32+
);
33+
};
34+
35+
export default SkeletonPostCard;
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.card_resent {
2+
display: flex;
3+
flex-direction: column;
4+
justify-content: space-between;
5+
align-items: flex-start;
6+
padding: var(--card-padding);
7+
width: calc(var(--card-width) * 2 + var(--gap) * 1);
8+
height: calc(var(--card-height) * 4 + var(--gap) * 3);
9+
background-color: var(--card-background-color);
10+
border-radius: var(--border-radius);
11+
overflow: hidden;
12+
}
13+
14+
.item_header,
15+
.item_footer {
16+
display: flex;
17+
width: 100%;
18+
justify-content: space-between;
19+
align-items: center;
20+
}
21+
22+
.icon_container {
23+
display: flex;
24+
justify-content: flex-end;
25+
align-items: center;
26+
gap: 8px;
27+
font-size: var(--caption);
28+
29+
div {
30+
display: flex;
31+
align-items: center;
32+
gap: 4px;
33+
width: 24px;
34+
}
35+
}
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import PopularPostCard from "./PopularPostCard";
2-
import RecentPostCard from "./RecentPostCard";
1+
import PopularPostCard from "@/components/main/card/PostCard/PopularPostCard";
2+
import RecentPostCard from "@/components/main/card/PostCard/RecentPostCard";
3+
import SkeletonPostCard from "@/components/main/card/PostCard/SkeletonPostCard";
34

4-
export { PopularPostCard, RecentPostCard };
5+
export { PopularPostCard, RecentPostCard, SkeletonPostCard };

src/components/main/card/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { OauthCard } from "@/components/main/card/OauthCard";
1010
import {
1111
PopularPostCard,
1212
RecentPostCard,
13+
SkeletonPostCard,
1314
} from "@/components/main/card/PostCard";
1415
import { ProfileCard } from "@/components/main/card/ProfileCard";
1516
import { RateCard } from "@/components/main/card/RateCard";
@@ -31,6 +32,7 @@ export {
3132
OauthCard,
3233
PopularPostCard,
3334
RecentPostCard,
35+
SkeletonPostCard,
3436
ProfileCard,
3537
RateCard,
3638
RecentCard,

0 commit comments

Comments
 (0)