Skip to content

Commit

Permalink
fix: prev next button display
Browse files Browse the repository at this point in the history
  • Loading branch information
bastyen committed May 23, 2024
1 parent 3fbd25d commit 03a6acf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 34 deletions.
21 changes: 3 additions & 18 deletions src/components/grw-poi-detail/grw-poi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,24 +133,9 @@ export class GrwPoiDetail {
</div>
)}
</div>
<div
style={{ display: this.offline || this.poi.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'block' }}
part="swiper-pagination"
class="swiper-pagination"
ref={el => (this.paginationElPoiRef = el)}
></div>
<div
style={{ display: this.offline || this.poi.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'flex' }}
part="swiper-button-prev"
class="swiper-button-prev"
ref={el => (this.prevElPoiRef = el)}
></div>
<div
style={{ display: this.offline || this.poi.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'flex' }}
part="swiper-button-next"
class="swiper-button-next"
ref={el => (this.nextElPoiRef = el)}
></div>
<div style={{ display: this.offline ? 'none' : 'block' }} part="swiper-pagination" class="swiper-pagination" ref={el => (this.paginationElPoiRef = el)}></div>
<div style={{ display: this.offline ? 'none' : 'flex' }} part="swiper-button-prev" class="swiper-button-prev" ref={el => (this.prevElPoiRef = el)}></div>
<div style={{ display: this.offline ? 'none' : 'flex' }} part="swiper-button-next" class="swiper-button-next" ref={el => (this.nextElPoiRef = el)}></div>
</div>
</div>
<div part="poi-sub-container" class="poi-sub-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,19 +166,19 @@ export class GrwTouristicContentCard {
)}
</div>
<div
style={{ display: this.offline || this.touristicContent.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'block' }}
style={{ display: this.offline ? 'none' : 'block' }}
part="swiper-pagination"
class="swiper-pagination"
ref={el => (this.paginationElTouristicContentRef = el)}
></div>
<div
style={{ display: this.offline || this.touristicContent.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'block' }}
style={{ display: this.offline ? 'none' : 'flex' }}
part="swiper-button-prev"
class="swiper-button-prev"
ref={el => (this.prevElTouristicContentRef = el)}
></div>
<div
style={{ display: this.offline || this.touristicContent.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'block' }}
style={{ display: this.offline ? 'none' : 'flex' }}
part="swiper-button-next"
class="swiper-button-next"
ref={el => (this.nextElTouristicContentRef = el)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,23 +167,13 @@ export class GrwTouristicEvent {
)}
</div>
<div
style={{ display: this.offline || this.touristicEvent.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'block' }}
style={{ display: this.offline ? 'none' : 'block' }}
part="swiper-pagination"
class="swiper-pagination"
ref={el => (this.paginationElTouristicEventRef = el)}
></div>
<div
style={{ display: this.offline || this.touristicEvent.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'block' }}
part="swiper-button-prev"
class="swiper-button-prev"
ref={el => (this.prevElTouristicEventRef = el)}
></div>
<div
style={{ display: this.offline || this.touristicEvent.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'block' }}
part="swiper-button-next"
class="swiper-button-next"
ref={el => (this.nextElTouristicEventRef = el)}
></div>
<div style={{ display: this.offline ? 'none' : 'flex' }} part="swiper-button-prev" class="swiper-button-prev" ref={el => (this.prevElTouristicEventRef = el)}></div>
<div style={{ display: this.offline ? 'none' : 'flex' }} part="swiper-button-next" class="swiper-button-next" ref={el => (this.nextElTouristicEventRef = el)}></div>
</div>
) : this.touristicEvent.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (
<img
Expand Down

0 comments on commit 03a6acf

Please sign in to comment.