Open lik3yoo opened 1 month ago
I want to go to login page when token is missing. And I want to redirect in _middleware.ts like this document describe https://fresh.deno.dev/docs/concepts/middleware#middleware-redirects.
and reuslt like this , style dosen't work. here is my code https://github.com/lik3yoo/fresh-project/blob/main/routes/_middleware.tsx#L11.
Thank you so much
@marvinhagemeister can you help me
I think you have to check ctx.destination and only redirect to login when it is route.
I want to go to login page when token is missing. And I want to redirect in _middleware.ts like this document describe https://fresh.deno.dev/docs/concepts/middleware#middleware-redirects.
and reuslt like this , style dosen't work. here is my code https://github.com/lik3yoo/fresh-project/blob/main/routes/_middleware.tsx#L11.
Thank you so much