We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8106b7c commit 5f1bbd3Copy full SHA for 5f1bbd3
src/app/(public)/repos/_components/stars-filter.tsx
@@ -14,9 +14,11 @@ interface FormValues {
14
endStars: number | '';
15
}
16
17
+type Pathname = '/repos' | `/repos/${string}`;
18
+
19
export function StarsFilter() {
20
const router = useRouter();
- const pathname = usePathname();
21
+ const pathname = usePathname() as Pathname;
22
const searchParams = useSearchParams();
23
const params = useParams();
24
const { handleSubmit, control, reset } = useForm<FormValues>({
@@ -95,4 +97,4 @@ export function StarsFilter() {
95
97
</div>
96
98
</form>
99
);
-}
100
+}
0 commit comments