Browse Source

#140

pull/254/head
みてるぞ 1 week ago
parent
commit
0994d54f0f
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      frontend/src/lib/prefetchers.ts

+ 2
- 2
frontend/src/lib/prefetchers.ts View File

@@ -67,12 +67,12 @@ const prefetchPostChanges: Prefetcher = async (qc, url) => {


export const routePrefetchers: { test: (u: URL) => boolean; run: Prefetcher }[] = [ export const routePrefetchers: { test: (u: URL) => boolean; run: Prefetcher }[] = [
{ test: u => u.pathname === '/' || u.pathname === '/posts', run: prefetchPostsIndex }, { test: u => u.pathname === '/' || u.pathname === '/posts', run: prefetchPostsIndex },
{ test: u => (['/posts/new', '/posts/changes'].includes (u.pathname)
{ test: u => (!(['/posts/new', '/posts/changes'].includes (u.pathname))
&& Boolean (mPost (u.pathname))), && Boolean (mPost (u.pathname))),
run: prefetchPostShow }, run: prefetchPostShow },
{ test: u => u.pathname === '/posts/changes', run: prefetchPostChanges }, { test: u => u.pathname === '/posts/changes', run: prefetchPostChanges },
{ test: u => u.pathname === '/wiki', run: prefetchWikiPagesIndex }, { test: u => u.pathname === '/wiki', run: prefetchWikiPagesIndex },
{ test: u => (['/wiki/new', '/wiki/changes'].includes (u.pathname)
{ test: u => (!(['/wiki/new', '/wiki/changes'].includes (u.pathname))
&& Boolean (mWiki (u.pathname))), && Boolean (mWiki (u.pathname))),
run: prefetchWikiPageShow }, run: prefetchWikiPageShow },
] ]


Loading…
Cancel
Save