create-middag-ui 0.15.4 → 0.15.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/scaffold.js +2 -2
- package/package.json +1 -1
package/lib/scaffold.js
CHANGED
|
@@ -1100,7 +1100,7 @@ export function PageProvider({ value, children }: {
|
|
|
1100
1100
|
return React.createElement(PageContext.Provider, { value }, children);
|
|
1101
1101
|
}
|
|
1102
1102
|
|
|
1103
|
-
export function usePage<T = Record<string, unknown>>(): { props: T; url: string } {
|
|
1103
|
+
export function usePage<T extends Record<string, unknown> = Record<string, unknown>>(): { props: T; url: string } {
|
|
1104
1104
|
return React.useContext(PageContext) as { props: T; url: string };
|
|
1105
1105
|
}
|
|
1106
1106
|
|
|
@@ -1892,7 +1892,7 @@ const mockSharedProps = {
|
|
|
1892
1892
|
scope: { extension: null, context: "global" },
|
|
1893
1893
|
};
|
|
1894
1894
|
|
|
1895
|
-
export function usePage<T = Record<string, unknown>>(): { props: T; url: string } {
|
|
1895
|
+
export function usePage<T extends Record<string, unknown> = Record<string, unknown>>(): { props: T; url: string } {
|
|
1896
1896
|
const contract = typeof window !== "undefined" ? (window as any).__MIDDAG_MOCK_CONTRACT__ : undefined;
|
|
1897
1897
|
return {
|
|
1898
1898
|
props: { ...mockSharedProps, navigation: buildNavigation(), contract } as T,
|