Skip to content

Commit 5f1bbd3

Browse files
fix type error
1 parent 8106b7c commit 5f1bbd3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/app/(public)/repos/_components/stars-filter.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ interface FormValues {
1414
endStars: number | '';
1515
}
1616

17+
type Pathname = '/repos' | `/repos/${string}`;
18+
1719
export function StarsFilter() {
1820
const router = useRouter();
19-
const pathname = usePathname();
21+
const pathname = usePathname() as Pathname;
2022
const searchParams = useSearchParams();
2123
const params = useParams();
2224
const { handleSubmit, control, reset } = useForm<FormValues>({
@@ -95,4 +97,4 @@ export function StarsFilter() {
9597
</div>
9698
</form>
9799
);
98-
}
100+
}

0 commit comments

Comments
 (0)