File tree Expand file tree Collapse file tree 3 files changed +13
-14
lines changed Expand file tree Collapse file tree 3 files changed +13
-14
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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"
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export interface SnippetType {
1515 code : string [ ] ;
1616 tags : string [ ] ;
1717 author : string ;
18- } ;
18+ }
1919
2020export type AppState = {
2121 language : LanguageType ;
You can’t perform that action at this time.
0 commit comments