{ColorList}
{isEraseBtn &&
}
diff --git a/src/containers/commons/Snackbar.tsx b/src/containers/commons/Snackbar.tsx
index 9597b77..670b488 100644
--- a/src/containers/commons/Snackbar.tsx
+++ b/src/containers/commons/Snackbar.tsx
@@ -1,56 +1,55 @@
-import styled from 'styled-components'
-import { useSelector, useDispatch } from 'react-redux'
+import styled from "styled-components";
+import { useSelector, useDispatch } from "react-redux";
// components
-import Snackbar from 'components/commons/Snackbar'
+import Snackbar from "components/commons/Snackbar";
// lib
-import zIndex from 'lib/styles/zIndex'
-import media from 'lib/styles/media'
+import zIndex from "lib/styles/zIndex";
+import media from "lib/styles/media";
// slices
-import { deleteSnackbar } from 'slices/snackbar'
+import { deleteSnackbar } from "slices/snackbar";
// types
-import { RootState } from 'slices'
-import { SnackbarState } from 'slices/snackbar'
+import { RootState } from "slices";
+import { SnackbarState } from "slices/snackbar";
-
-const SnackbarWrapper = ()=> {
+const SnackbarWrapper = () => {
const dispatch = useDispatch();
- const snackbar = useSelector
(state => state.snackbar);
-
+ const snackbar = useSelector(
+ (state) => state.snackbar
+ );
- const onClick = (e: React.MouseEvent) => {
- if (e) {
- e.preventDefault();
- e.stopPropagation();
- }
- dispatch(deleteSnackbar());
- };
+ const onClick = (e: React.MouseEvent) => {
+ if (e) {
+ e.preventDefault();
+ e.stopPropagation();
+ }
+ dispatch(deleteSnackbar());
+ };
-
- return (
-
- {snackbar.text !== '' && }
-
- );
-}
+ return (
+
+ {snackbar.text !== "" && (
+
+ )}
+
+ );
+};
const Container = styled.div`
- position: fixed;
- top: 40px;
- right: 30px;
- width: 320px;
- height: auto;
- z-index: ${zIndex.snackbar};
+ position: fixed;
+ top: 40px;
+ right: 30px;
+ width: 320px;
+ height: auto;
+ z-index: ${zIndex.snackbar};
- ${media.small} {
- width: 100%;
- top: initial;
- bottom: 0;
- left: 0;
- right: 0;
- margin: auto;
- }
+ ${media.small} {
+ width: 100%;
+ top: initial;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ margin: auto;
+ }
`;
-export default SnackbarWrapper
\ No newline at end of file
+export default SnackbarWrapper;
diff --git a/src/containers/menu/commons/Highlight.tsx b/src/containers/menu/commons/Highlight.tsx
index 4812c52..84d3a0d 100644
--- a/src/containers/menu/commons/Highlight.tsx
+++ b/src/containers/menu/commons/Highlight.tsx
@@ -50,8 +50,6 @@ const Highlight = ({
return (
-
{highlight.chpaterName}
-
{highlight.content}
diff --git a/src/slices/book.ts b/src/slices/book.ts
index d772461..45eb0b8 100644
--- a/src/slices/book.ts
+++ b/src/slices/book.ts
@@ -35,12 +35,12 @@ const initialCurrentLocation: Page = {
/** 초기 색상표 상태 */
const initialColorList: Color[] = [
- { name: "قرمز", code: palette.red4 },
- { name: "نارنجی", code: palette.orange4 },
- { name: "زرد", code: palette.yellow4 },
- { name: "سبز", code: palette.green4 },
- { name: "آبی", code: palette.blue4 },
- { name: "بنفش", code: palette.purple4 },
+ { code: palette.red4 },
+ { code: palette.orange4 },
+ { code: palette.yellow4 },
+ { code: palette.green4 },
+ { code: palette.blue4 },
+ { code: palette.purple4 },
];
const initialState: BookState = {
@@ -64,16 +64,6 @@ const bookSlice = createSlice({
},
/** CurrentPage 갱신 @dispatch */
updateCurrentPage(state, action: PayloadAction) {
- if (
- state.currentLocation.currentPage == action.payload.currentPage &&
- action.payload.chapterName
- ) {
- console.log(JSON.parse(JSON.stringify(state)));
- // let c = current(state)
- // let x = [...c.toc];
- // console.log(x[1]);
- alert("فصل بعد");
- }
state.currentLocation = action.payload;
},
/** Book 초기화 @dispatch */
diff --git a/src/types/highlight.ts b/src/types/highlight.ts
index cd39187..378843a 100644
--- a/src/types/highlight.ts
+++ b/src/types/highlight.ts
@@ -28,7 +28,6 @@ interface Highlight {
* @param code 색상 Hex 코드
*/
export interface Color {
- name: string;
code: string;
}