Skip to content

Commit 004dca6

Browse files
committed
fix: lint errors fix
1 parent 865ee36 commit 004dca6

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

src/components/SnippetList.tsx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,27 @@ const SnippetList = () => {
3131

3232
return (
3333
<>
34-
<motion.ul
35-
role="list"
36-
className="snippets"
37-
>
34+
<motion.ul role="list" className="snippets">
3835
<AnimatePresence mode="popLayout">
3936
{fetchedSnippets.map((snippet, idx) => (
4037
<motion.li
4138
key={idx}
4239
initial={{ opacity: 0, y: 20 }}
43-
animate={{
44-
opacity: 1,
40+
animate={{
41+
opacity: 1,
4542
y: 0,
4643
transition: {
4744
delay: idx * 0.05,
48-
duration: 0.2
49-
}
45+
duration: 0.2,
46+
},
5047
}}
51-
exit={{
52-
opacity: 0,
48+
exit={{
49+
opacity: 0,
5350
y: -20,
5451
transition: {
5552
delay: (fetchedSnippets.length - 1 - idx) * 0.01,
56-
duration: 0.09
57-
}
53+
duration: 0.09,
54+
},
5855
}}
5956
>
6057
<motion.button

src/components/SnippetModal.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ const SnippetModal: React.FC<Props> = ({
2020
handleCloseModal,
2121
}) => {
2222
const modalRoot = document.getElementById("modal-root");
23-
if (!modalRoot) return null;
23+
2424
useEscapeKey(handleCloseModal);
2525

26+
if (!modalRoot) return null;
27+
2628
return ReactDOM.createPortal(
2729
<motion.div
2830
key="modal-overlay"

src/types/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface SnippetType {
1515
code: string[];
1616
tags: string[];
1717
author: string;
18-
};
18+
}
1919

2020
export type AppState = {
2121
language: LanguageType;

0 commit comments

Comments
 (0)