Open chromy opened 3 weeks ago
Ah yes. That is always a fun one. Haven't found the solution. Depending on the surrounding context and what feels nice I'd go for one of three options:
let
block in Elm. In this case that would be a little bit annoying due to the Option returned by getUserFromSession
, so an early return might be needed.Pragmatically I'd probably go for the first option. Zooming out I am wondering whether pageTemplate
should even require a User
. It is only used to toggle log-in/log-out in the navbar, however all of our pages apart from the log-in require the user to be logged in. At this point I'd suggest ripping out the requirement for User
in the pageTemplate
and that should remove the issue you encountered.
I was looking into converting the 'commands' pages (
formGet
) to usepageTemplate
as done already byqueryGet
. This avoids every route having to apply the template itself.I think I found the place where
pageTemplate
ought to be added. However I don't understand what the idiomatic way to thread a variable from earlier in the pipe is. @Lan2u @erkannt: any advice you have appreciated! XD