Skip to content

Commit eafcfef

Browse files
committed
refactor: update Feed component to use feedLoading class for loading state and enhance placeholder styling
1 parent 449b680 commit eafcfef

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

src/features/feed/components/Feed.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const Feed = () => {
5757

5858
if (isInitialLoading) {
5959
return (
60-
<div className="feed">
60+
<div className="feed feedLoading">
6161
{Array.from({
6262
length: 10,
6363
}).map((_, index) => (

src/features/feed/components/feed.css

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,23 @@
4949
}
5050
}
5151

52+
.feed > * {
53+
box-sizing: border-box;
54+
max-width: 100%;
55+
overflow: hidden;
56+
}
57+
.feedLoading .placeholder {
58+
min-height: 360px;
59+
}
5260
.feed .placeholder {
5361
animation-duration: 1.5s;
5462
animation-name: cardPlaceholderPulse;
5563
animation-iteration-count: infinite;
5664
padding: 12px;
5765
display: flex;
5866
flex-direction: column;
59-
min-height: 360px;
6067
gap: 16px;
68+
box-sizing: border-box;
6169
.image {
6270
background-color: var(--placeholder-background-color);
6371
border: 1px solid var(--placeholder-border-color);

0 commit comments

Comments
 (0)