Skip to content

Commit

Permalink
[๐Ÿฅ : feat] ํƒ€์ž„๋ผ์ธ์— ๊ธ€์ด ์—†๋Š” ๊ฒฝ์šฐ ํ…์ŠคํŠธ ๋…ธ์ถœ (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
sryung1225 committed Dec 26, 2023
1 parent 58e15ee commit a9f0081
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/components/timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ export default function Timeline() {
}
};
}, []);
return (
return tweets.length !== 0 ? (
<S.TimelineWrapper>
{tweets.map((tweet) => (
<Tweet key={tweet.id} {...tweet} />
))}
</S.TimelineWrapper>
) : (
<S.Text>์ž‘์„ฑ๋œ ๊ธ€์ด ์—†์Šต๋‹ˆ๋‹ค.</S.Text>
);
}
6 changes: 4 additions & 2 deletions src/components/user-timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import {
where,
} from 'firebase/firestore';
import { auth, db } from '../firebase.ts';
import ITweet from '../interfaces/ITweet.ts';
import Tweet from './tweet.tsx';
import * as S from '../styles/timeline.ts';
import ITweet from '../interfaces/ITweet.ts';

export default function UserTimeline() {
const user = auth.currentUser;
Expand Down Expand Up @@ -47,11 +47,13 @@ export default function UserTimeline() {
}
};
}, []);
return (
return tweets.length !== 0 ? (
<S.TimelineWrapper>
{tweets.map((tweet) => (
<Tweet key={tweet.id} {...tweet} />
))}
</S.TimelineWrapper>
) : (
<S.Text>์ž‘์„ฑ๋œ ๊ธ€์ด ์—†์Šต๋‹ˆ๋‹ค.</S.Text>
);
}

0 comments on commit a9f0081

Please sign in to comment.