Api redirects and content flashes

  • benjamin.h-1351936343877615757

    Ben H

    7 days ago

    Just wanted clarification on how server side fetching works in combination with redirect rules. I set up a redirect rule so that if a user is already logged in, it redirects them to the dashboard. The redirect works, but the content of the page flashes before the redirect. I thought that since I have server-side fetching enabled, it would redirect before loading anything?
    1351936344103981098-image.png
  • martinf4630-1351940430031229080

    MartinF

    7 days ago

    Do you have 'Is Server' in your formula?
  • 1351940598604632124-Screenshot_2024-11-04_at_10.png
    πŸ‘1
  • benjamin.h-1351955635796705463

    Ben H

    7 days ago

    When I add Is Server, it doesn't redirect at all, suggesting that the rule is not being evaluated server side
  • lucasg-1351956282835337226

    Lucas G

    7 days ago

    Is server is not required for it to evaluate server-side
    πŸ‘1
  • Something about the formula is causing it be checked client-side
  • Are you able to show the formulas or perhaps the API is being called "on load" somewhere?
  • benjamin.h-1351956886576042099

    Ben H

    7 days ago

    The rule formula is this
    1351956886337097738-image.png
  • the api request is in a user-provider component with an attribute to determine redirect urls
  • the attribute is used in the redirect rule
  • nothing in any on load cycles, although the on attribute change does refresh the api
  • lucasg-1351957346909159577

    Lucas G

    7 days ago

    what is the hasValue formula
  • benjamin.h-1351957542166855812

    Ben H

    7 days ago

    ahh, that's it. it is from the spark one template but it is custom code
  • i'll have to change that
  • lucasg-1351957888117117009

    Lucas G

    7 days ago

    Could do Default to null -> Not equal to null
    πŸ‘1

Stop scrolling. Start building.

toddle is a visual web app builder that rivals custom code β€” but accessible to your entire team!

Try toddle β€” it's free!

Β© Copyright 2024 toddle. All rights reserved.