Skip to content

Commit

Permalink
feat(app): trigger view transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
yjl9903 committed Sep 30, 2023
1 parent c6d9330 commit 9d97c63
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/app/src/components/Search/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { navigate } from 'astro:transitions/client';
import { findFansub, stringifySearchURL } from 'animegarden';

import { histories, loading } from '../../state';
import { loading } from '../../state';

export const DMHY_RE = /(?:https:\/\/share.dmhy.org\/topics\/view\/)?(\d+_[a-zA-Z0-9_\-]+\.html)/;

Expand Down Expand Up @@ -95,8 +96,7 @@ export function goToSearch(search: string) {

export function goTo(href: string) {
loading.set(true);
// window.location.href = href;
window.open(href, '_self');
navigate(href, { history: 'push' });
}

export function debounce<T extends (...args: any[]) => void>(fn: T, time = 1000): T {
Expand Down

0 comments on commit 9d97c63

Please sign in to comment.