@@ -10,7 +10,7 @@ export const getComics = async (hostName, page, type = null) => {
10
10
) ;
11
11
12
12
// Construct the URL and parameters based on the host, type, and page
13
- let params = `${ type } ?page=${ page } ` ;
13
+ let params = `${ type ?? '' } ?page=${ page } ` ;
14
14
if (
15
15
( page === 1 || page == null ) &&
16
16
hostName === ComicHostName . readcomicsonline
@@ -114,6 +114,7 @@ const HomeType = {
114
114
getComics ( ComicHostName . comichubfree , 1 , 'hot-comic' ) ,
115
115
getComics ( ComicHostName . comichubfree , 1 , 'new-comic' ) ,
116
116
getComics ( ComicHostName . comichubfree , 1 , 'popular-comic' ) ,
117
+ getComics ( ComicHostName . comichubfree , 1 ) ,
117
118
] ,
118
119
} ;
119
120
@@ -124,30 +125,38 @@ export const getComicsHome = async (
124
125
) => {
125
126
setLoading ( true ) ;
126
127
try {
127
- const [ hot_comic_updates , latest_release , most_viewed ] = await Promise . all (
128
- HomeType [ type ] ,
129
- ) ;
128
+ const [ hot_comic_updates , latest_release , most_viewed , all_comic ] =
129
+ await Promise . all ( HomeType [ type ] ) ;
130
130
131
131
const ComicHomeList = { } ;
132
132
133
- if ( hot_comic_updates ) {
134
- ComicHomeList [ 'hot -comic-updates ' ] = {
135
- title : 'Hot Comic' ,
136
- data : hot_comic_updates ?. comicsData ,
137
- hostName : ComicHostName . readcomicsonline ,
138
- lastPage : hot_comic_updates ?. lastPage ,
133
+ if ( all_comic ) {
134
+ ComicHomeList [ 'all -comic' ] = {
135
+ title : 'Latest Comic' ,
136
+ data : all_comic ?. comicsData ,
137
+ hostName : ComicHostName . comichubfree ,
138
+ lastPage : all_comic ?. lastPage ,
139
139
} ;
140
140
}
141
141
142
142
if ( latest_release ) {
143
143
ComicHomeList [ 'latest-release' ] = {
144
- title : 'Latest Release' ,
144
+ title : type === 'comichubfree' ? 'New Comic' : 'Latest Release' ,
145
145
data : latest_release ?. comicsData ,
146
146
hostName : ComicHostName . readcomicsonline ,
147
147
lastPage : latest_release ?. lastPage ,
148
148
} ;
149
149
}
150
150
151
+ if ( hot_comic_updates ) {
152
+ ComicHomeList [ 'hot-comic-updates' ] = {
153
+ title : 'Hot Comic' ,
154
+ data : hot_comic_updates ?. comicsData ,
155
+ hostName : ComicHostName . readcomicsonline ,
156
+ lastPage : hot_comic_updates ?. lastPage ,
157
+ } ;
158
+ }
159
+
151
160
if ( most_viewed ) {
152
161
ComicHomeList [ 'most-viewed' ] = {
153
162
title : 'Most Viewed' ,
0 commit comments