diff --git a/components/FullCoverSpinner.tsx b/components/FullCoverSpinner.tsx
new file mode 100644
index 0000000..1c8749b
--- /dev/null
+++ b/components/FullCoverSpinner.tsx
@@ -0,0 +1,15 @@
+import { ReactNode } from 'react';
+import Spinner from './Spinner';
+
+interface Props {
+ children?: ReactNode;
+}
+
+export default function FullCoverSpinner({ children }: Props) {
+ return (
+
+
+ {children}
+
+ );
+}
diff --git a/components/TextEditor.tsx b/components/TextEditor.tsx
index d3e0be7..5203de3 100644
--- a/components/TextEditor.tsx
+++ b/components/TextEditor.tsx
@@ -27,7 +27,7 @@ export default function TextEditor({ value = '', onChange }: Props) {
['bold', 'italic', 'underline'],
[{ align: null }, { align: 'center' }, { align: 'right' }],
[{ list: 'ordered' }, { list: 'bullet' }],
- ['blockquote', 'link', 'image'],
+ ['blockquote', 'link'],
],
},
};
diff --git a/components/wikiList.page/ListItem.tsx b/components/wikiList.page/ListItem.tsx
index 3512382..f2e1fa9 100644
--- a/components/wikiList.page/ListItem.tsx
+++ b/components/wikiList.page/ListItem.tsx
@@ -42,14 +42,16 @@ export default function ListItem({ data, onSnackBarClick }: ListItemProps) {
href={`/wiki/${code}`}
className="flex gap-8 rounded-full px-9 py-6 mo:gap-5 mo:px-6 mo:py-5"
>
-
+
+
+
{name}
diff --git a/pages/addboard/index.tsx b/pages/addboard/index.tsx
index b60ad90..6c1a264 100644
--- a/pages/addboard/index.tsx
+++ b/pages/addboard/index.tsx
@@ -24,6 +24,7 @@ export default function Addboard() {
const [content, setContent] = useState('');
const [imageUrl, setImageUrl] = useState('');
const [isModalOpen, setIsModalOpen] = useState(false);
+ const [isLoading, setIsLoading] = useState(false);
const [imageFile, setImageFile] = useState(null);
const router = useRouter();
@@ -58,7 +59,8 @@ export default function Addboard() {
'게시물이 등록되었습니다. 작성된 게시물로 이동 됩니다.',
async () => {
await router.push('/boards/' + data.id);
- }
+ },
+ 1000
);
},
});
@@ -86,6 +88,7 @@ export default function Addboard() {
// 작성 폼 서브밋 함수
const handleSubmit = async (e: FormEvent) => {
e.preventDefault();
+ setIsLoading(true);
if (imageFile) {
formData.append('image', imageFile);
@@ -109,10 +112,11 @@ export default function Addboard() {
diff --git a/pages/wikilist/index.tsx b/pages/wikilist/index.tsx
index a636a3d..d604781 100644
--- a/pages/wikilist/index.tsx
+++ b/pages/wikilist/index.tsx
@@ -11,6 +11,7 @@ import Pagination from '@/components/Pagination/Pagination';
import SearchInput from '@/components/SearchInput';
import useSnackBar from '@/hooks/useSanckBar';
import SnackBar from '@/components/SnackBar';
+import FullCoverSpinner from '@/components/FullCoverSpinner';
// 위키 목록 페이지 프로필 데이터 타입
export interface ProfileProps {
@@ -112,8 +113,8 @@ export default function WikiList() {
});
}, [page, router]);
- // TODO: 로딩 스피너 & 에러 페이지 컴포넌트 추가
- if (isPending) return Loading...
;
+ if (isPending)
+ return 위키 목록 가져오는 중...;
// TODO: 에러 컴포넌트 추가
if (error) return Error: {error.message}
;
@@ -124,10 +125,10 @@ export default function WikiList() {
위키 목록{name && ` - 검색어 '${name}'`} | wikied
-