alvarotrigo / alvarotrigo/react-fullpage

[Question}: FPjs & nextjs & prismic dynamic content after page renderd

Đang mở
#415 5 bình luận 0 reaction 0 người được giao Xem trên GitHub
reproduction required
Ngôn ngữ chính
JavaScript
Star
1.3k
Fork
172
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hi,
I am using fullpage js with next 13 and prismic CMS (https://prismic.io/). All works fine when nextjs renders the page on server and links between sides are used with "normal" a href. But when using PrismicLink or NextLink and the side will be renderd on client side, I have a timing issue with the fullpage wrapper component. It looks like page wrapper will render the page and looks for the first section class but from prismic the section is not loaded in same time so fullpage gives an unkown index error.

If I add a div with className="section" in the fullpage wrapper before the first prismic component all works fine, but I have a useless div before content.
Question: Is there a way to add a "hidden" section div in fullpage?

Something like:

```
(

{/* here I need a hidden fullpage section */}

nothing to see, should be hidden


{/* renders not in the same time as fullpage, so I got an error */}

)}
/>

Would be great if you have any ideas for this problem.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.