@ -185,6 +185,7 @@ export const elements = {
return $el . hide ( )
return $el . hide ( )
}
}
$el . show ( )
if ( state . requestError || ! state . nextPagePath || state . loading ) {
if ( state . requestError || ! state . nextPagePath || state . loading ) {
return $el . attr ( 'disabled' , 'disabled' )
return $el . attr ( 'disabled' , 'disabled' )
}
}
@ -199,6 +200,7 @@ export const elements = {
return $el . hide ( )
return $el . hide ( )
}
}
$el . show ( )
if ( state . requestError || ! state . prevPagePath || state . loading ) {
if ( state . requestError || ! state . prevPagePath || state . loading ) {
return $el . attr ( 'disabled' , 'disabled' )
return $el . attr ( 'disabled' , 'disabled' )
}
}
@ -212,13 +214,14 @@ export const elements = {
if ( state . pagesStack . length === 0 ) {
if ( state . pagesStack . length === 0 ) {
return $el . hide ( )
return $el . hide ( )
}
}
$el . show ( )
$el . attr ( 'disabled' , false )
const urlParams = new URLSearchParams ( window . location . search )
const urlParams = new URLSearchParams ( window . location . search )
const blockParam = urlParams . get ( 'block_type' )
const blockParam = urlParams . get ( 'block_type' )
const firstPageHref = window . location . href . split ( '?' ) [ 0 ]
const firstPageHref = window . location . href . split ( '?' ) [ 0 ]
$el . show ( )
$el . attr ( 'disabled' , false )
if ( blockParam !== null ) {
if ( blockParam !== null ) {
$el . attr ( 'href' , firstPageHref + '?block_type=' + blockParam )
$el . attr ( 'href' , firstPageHref + '?block_type=' + blockParam )
} else {
} else {
@ -232,6 +235,7 @@ export const elements = {
return $el . hide ( )
return $el . hide ( )
}
}
$el . show ( )
if ( state . pagesStack . length === 0 ) {
if ( state . pagesStack . length === 0 ) {
return $el . text ( 'Page 1' )
return $el . text ( 'Page 1' )
}
}