Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions package/src/router/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export type Config = UserConfig;
*/
export const useHref = useHrefFactory(useLocale, useSchema);

export type { HrefOptions } from "../shared/useHrefFactory";

/**
* Hook that returns the current route pathname.
*
Expand All @@ -63,6 +65,8 @@ export const useRoute = useRouteFactory(useSchema);
*/
export const Link = LinkFactory(useHref);

export type { LinkProps } from "../shared/LinkFactory";

/**
* Form component with localized routing support.
*
Expand All @@ -72,6 +76,8 @@ export const Link = LinkFactory(useHref);
*/
export const Form = FormFactory(useHref);

export type { FormProps } from "../shared/FormFactory";

/**
* Hook for accessing and formatting localized messages.
*
Expand Down
2 changes: 1 addition & 1 deletion package/src/router/shared/FormFactory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {

type NextFormProps = ComponentProps<typeof NextForm>;

type FormProps<R extends Route> = Omit<NextFormProps, "action"> &
export type FormProps<R extends Route> = Omit<NextFormProps, "action"> &
({
action: R | Exclude<NextFormProps["action"], string> | (string & {});
locale?: Locale;
Expand Down
2 changes: 1 addition & 1 deletion package/src/router/shared/LinkFactory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {

type NextLinkProps = ComponentProps<typeof NextLink>;

type LinkProps<R extends Route> = Omit<NextLinkProps, "href"> &
export type LinkProps<R extends Route> = Omit<NextLinkProps, "href"> &
(
| { href: HrefOptions<R>; locale?: undefined; params?: undefined }
| ({ href: R | (string & {}); locale?: Locale } & ParamsOption<R>)
Expand Down
Loading