Skip to content

Commit e422932

Browse files
committed
feat: add no writings
1 parent 03bffb1 commit e422932

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

src/assets/images/no_writings.png

38.4 KB
Loading

src/components/MyWritingSwiper.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { useEffect, useState } from "react";
1212
import { getDaybookList } from "@api";
1313
import { GetDaybookResponse } from "@api/response";
1414
import LoadingSpinner from "./LoadingSpinner";
15+
import NoWritings from "./NoWritings";
1516

1617
const MyWritingSwiper = () => {
1718
const [data, setData] = useState<GetDaybookResponse[]>([]);
@@ -32,6 +33,8 @@ const MyWritingSwiper = () => {
3233

3334
if (isLoading) return <LoadingSpinner />;
3435

36+
if (data.length === 0) return <NoWritings />
37+
3538
return (
3639
<>
3740
<Swiper

src/components/NoWritings.tsx

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import styled from "@emotion/styled";
2+
3+
const NoWritings = () => {
4+
return (
5+
<Wrapper>
6+
<img src="/src/assets/images/no_writings.png" alt="no writings" width={'298px'} />
7+
</Wrapper>
8+
);
9+
};
10+
11+
export default NoWritings;
12+
13+
const Wrapper = styled.article`
14+
15+
width: 362px;
16+
height: 426px;
17+
18+
background-color: #F9F6F1;
19+
box-shadow: 2px 5px 16px -5px #00000026;
20+
21+
display: flex;
22+
justify-content: center;
23+
align-items: center;
24+
25+
`

0 commit comments

Comments
 (0)