@@ -57,8 +57,8 @@ export function Search({navigation}) {
5757 // https://readcomicsonline.ru/comic/{comic-name}/{chapter-name}
5858 let link = searchTerm . trim ( ) ;
5959 if (
60- // !link.startsWith('https://comichubfree.com/comic/') &&
61- ( ! link . startsWith ( 'https://readcomicsonline.ru/comic/' ) &&
60+ ( ! link . startsWith ( 'https://comichubfree.com/comic/' ) &&
61+ ! link . startsWith ( 'https://readcomicsonline.ru/comic/' ) &&
6262 ! link . startsWith ( 'https://readallcomics.com/category/' ) ) ||
6363 ( ! link . includes ( 'comic/' ) && ! link . includes ( 'category/' ) )
6464 ) {
@@ -67,34 +67,18 @@ export function Search({navigation}) {
6767 return ;
6868 }
6969
70- // comichubfreeResult,
71- const [ readcomicsonlineResult , readallcomicsResult ] = await Promise . all ( [
72- dispatch ( searchComic ( link , 'readcomicsonline' ) ) ,
73- // dispatch(searchComic(link, 'comichubfree')),
74- dispatch ( searchComic ( link , 'readallcomics' ) ) ,
75- ] ) ;
70+ const [ readcomicsonlineResult , comichubfreeResult , readallcomicsResult ] =
71+ await Promise . all ( [
72+ dispatch ( searchComic ( link , 'readcomicsonline' ) ) ,
73+ dispatch ( searchComic ( link , 'comichubfree' ) ) ,
74+ dispatch ( searchComic ( link , 'readallcomics' ) ) ,
75+ ] ) ;
7676
77- console . log ( 'readcomicsonlineResult' , {
78- readcomicsonlineResult ,
79- // comichubfreeResult,
80- readallcomicsResult ,
77+ setSearchData ( {
78+ ReadAllComic : readallcomicsResult ?? [ ] ,
79+ ComicHub : comichubfreeResult ?? [ ] ,
80+ ComicOnline : readcomicsonlineResult ?? [ ] ,
8181 } ) ;
82-
83- // || comichubfreeResult
84- if ( readcomicsonlineResult ) {
85- if (
86- // comichubfreeResult.length == 0 &&
87- readcomicsonlineResult . length == 0 &&
88- readallcomicsResult . length == 0
89- ) {
90- Alert . alert ( 'No results found' ) ;
91- }
92- setSearchData ( {
93- ReadAllComic : readallcomicsResult ,
94- // ComicHub: comichubfreeResult,
95- ComicOnline : readcomicsonlineResult ,
96- } ) ;
97- }
9882 return ;
9983 }
10084 // remove the last element if present in the link like 5, 100, etc
0 commit comments