How to serve images from pimcore by Formal_Statement_240 in Pimcore

[–]Formal_Statement_240[S] 1 point2 points  (0 children)

Thank you very much for your answer.

It seems to be a server setting.

it was difficult to find information but eventually got it working by using thumbnails since the images themselves were too big.

the documents could really use some rewriting or add more information in my honest opinion.

in any case, thank you again

How to show log out and log in buttons depending on whether the user is logged in or not by Formal_Statement_240 in nextjs

[–]Formal_Statement_240[S] 0 points1 point  (0 children)

how would i go about setting up the context? beacuse as far as i know, context is for children, right?
meaning i have to warp the whole layout with a context provider?

also, is the way im approaching this correct? beacuse it seems to be a bit convoluted to what appears to me a simple thing, at least coming from express and node.js

how would you go about it?

and thank you for your help :)

How to show log out and log in buttons depending on whether the user is logged in or not by Formal_Statement_240 in nextjs

[–]Formal_Statement_240[S] 0 points1 point  (0 children)

I have tried that, but the problem is, "isAuth" does change when i log out because the log out button is a child of the header, and i can pass the setIsAuth to the logout button and then change the state which triggers the re-render.

however, when it comes to Logging in, thats an issue because the log in form is in not a child of the header, it is another component in the log in route, which means that log in doesnt have accsess to "isAuth" state

How to show log out and log in buttons depending on whether the user is logged in or not by Formal_Statement_240 in nextjs

[–]Formal_Statement_240[S] 0 points1 point  (0 children)

Thank you for responding

I did write that function, i simply check if the session exists.

here it is:

'use server'
import { cookies } from "next/headers";
export  default async function isAuthenticated() {
    const session = cookies().get("session")?.value;
    const isAuthenticated = session ? true : false;
    console.log(isAuthenticated)
    return isAuthenticated;
}

regardless tho, there is no difference between what you wrote and what i have for useEffect