Skip to content

Commit

Permalink
feat: use relative:false
Browse files Browse the repository at this point in the history
  • Loading branch information
TylorS committed May 22, 2024
1 parent eadddf5 commit 26c1405
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/realworld/src/ui/components/EditArticle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function useEditArticle<R, R2>(
Effect.flatMap(onSubmit),
Effect.catchTags({
Unprocessable: (error) => RefSubject.set(errors, error.errors),
Unauthorized: () => Router.navigate(Routes.login),
Unauthorized: () => Router.navigate(Routes.login, { relative: false }),
ParseError: (issue) => RefSubject.set(errors, [issue.message])
})
)
Expand Down
2 changes: 1 addition & 1 deletion examples/realworld/src/ui/pages/article.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function ArticleMeta<E, R>(ref: RefSubject.RefSubject<Article, E, R>) {
const deleteArticle = Effect.gen(function*() {
const slug = yield* article.slug
yield* Articles.delete({ slug })
yield* Router.navigate(Routes.home)
yield* Router.navigate(Routes.home, { relative: false })
})

const currentUserActions = Fx.if(currentUserIsAuthor, {
Expand Down
2 changes: 1 addition & 1 deletion examples/realworld/src/ui/pages/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const main = Fx.gen(function*(_) {

const logoutCurrentUser = RefSubject.set(CurrentUser, AsyncData.noData()).pipe(
Effect.zipRight(Users.logout()),
Effect.zipRight(Router.navigate(Routes.login))
Effect.zipRight(Router.navigate(Routes.login, { relative: false }))
)

return html`<div class="settings-page">
Expand Down

0 comments on commit 26c1405

Please sign in to comment.