getting slug and query from url without `use client`
Unanswered
Knopper gall posted this in #help-forum
Knopper gallOP
I'm having what I think is a weird issue, leaning Next as I go, so maybe its not so weird to you more experienced devs π
The reason I'm asking how to do it, without
I have a page, that until I add '
Images are rendered with
The URL pattern that I want to get working, is
Once the page detection is working, I will be limiting the
Getting the
I've tried moving the page detection to a separate imported function with
Any help very much appreciated
The reason I'm asking how to do it, without
use client
is to me the weird problem.I have a page, that until I add '
use client
to the top of it, renders just fine, but as soon as I put it in, the images on the page, will apparently choose a random number and only render that many images, usually 10-15 images but it's inconsistent. without it, it will render as many as there are on the page (and yes I've tried it with over 1000 images, its takes a ~20 seconds but the images are all there)Images are rendered with
<Image>
tags and come from a directus backend, but I know getting the image URL's is not part of the issue as they all render The URL pattern that I want to get working, is
[slug]?[page=x]
Once the page detection is working, I will be limiting the
get
to 30 items.Getting the
slug
I can reliably with do but adding the page
detection is proving impossible to me without breaking the pageI've tried moving the page detection to a separate imported function with
use client
but I just get a function returned rather than a number, but again the images randomly loadAny help very much appreciated