File tree Expand file tree Collapse file tree
src/components/ui/bottomsheet Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /* eslint-env node */
12const fs = require ( 'fs' ) ;
23const path = require ( 'path' ) ;
34const { execSync } = require ( 'child_process' ) ;
3031
3132 console . log ( 'Generating ICO file...' ) ;
3233 const pngBuffer = fs . readFileSync ( tempPng ) ;
33- const size = 256 ; // We resized it to 256
34-
34+ // size variable removed as it was unused
35+
3536 // ICO Header
3637 // 0-1: Reserved (0)
3738 // 2-3: Type (1 for ICO)
5354 const entry = Buffer . alloc ( 16 ) ;
5455 entry . writeUInt8 ( 0 , 0 ) ; // 256 width -> 0
5556 entry . writeUInt8 ( 0 , 1 ) ; // 256 height -> 0
56- entry . writeUInt8 ( 0 , 2 ) ;
57+ entry . writeUInt8 ( 0 , 2 ) ;
5758 entry . writeUInt8 ( 0 , 3 ) ;
5859 entry . writeUInt16LE ( 1 , 4 ) ;
5960 entry . writeUInt16LE ( 32 , 6 ) ;
6768 fs . unlinkSync ( tempPng ) ;
6869
6970 console . log ( `Successfully created ${ outputIco } ` ) ;
70-
7171} catch ( error ) {
7272 console . error ( 'Error generating ICO:' , error ) ;
7373 process . exit ( 1 ) ;
Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ const BottomSheetContext = createContext<{
4242} > ( {
4343 visible : false ,
4444 bottomSheetRef : null ,
45- handleClose : ( ) => { } ,
46- handleOpen : ( ) => { } ,
45+ handleClose : ( ) => { } ,
46+ handleOpen : ( ) => { } ,
4747} ) ;
4848
4949type IBottomSheetProps = React . ComponentProps < typeof GorhomBottomSheet > ;
@@ -166,14 +166,14 @@ export const BottomSheetContent = ({ ...props }: IBottomSheetContent) => {
166166 const keyDownHandlers = useMemo ( ( ) => {
167167 return Platform . OS === 'web'
168168 ? {
169- onKeyDown : ( e : React . KeyboardEvent ) => {
170- if ( e . key === 'Escape' ) {
171- e . preventDefault ( ) ;
172- handleClose ( ) ;
173- return ;
174- }
175- } ,
176- }
169+ onKeyDown : ( e : React . KeyboardEvent ) => {
170+ if ( e . key === 'Escape' ) {
171+ e . preventDefault ( ) ;
172+ handleClose ( ) ;
173+ return ;
174+ }
175+ } ,
176+ }
177177 : { } ;
178178 } , [ handleClose ] ) ;
179179
You can’t perform that action at this time.
0 commit comments