refactor: migrate TrumpSignal to TypeScript monorepo and Pages Router

This commit is contained in:
2026-11-03 20:42:30 +08:00
parent de1a903462
commit 1791dbb557
188 changed files with 52461 additions and 2 deletions
+10
View File
@@ -0,0 +1,10 @@
import { useRouter } from 'next/router'
export function usePathname(): string {
return useRouter().asPath.split('?')[0]
}
export function useParams(): Record<string, string | string[]> {
return useRouter().query as Record<string, string | string[]>
}
export function useSearchParams(): URLSearchParams {
return new URLSearchParams(useRouter().asPath.split('?')[1] ?? '')
}