@@ -295,15 +295,12 @@ export function Links(): React.JSX.Element {
295
295
* @mode framework
296
296
* @param props Props
297
297
* @param props.page The absolute path of the page to prefetch, e.g. `/absolute/path`.
298
- * @param props.dataLinkProps Additional props to pass to the
298
+ * @param props.linkProps Additional props to spread onto the
299
299
* [`<link>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/link)
300
- * tag , such as `crossOrigin`, `integrity`, `rel`, etc.
300
+ * tags , such as `crossOrigin`, `integrity`, `rel`, etc.
301
301
* @returns A collection of React elements for `<link>` tags
302
302
*/
303
- export function PrefetchPageLinks ( {
304
- page,
305
- ...dataLinkProps
306
- } : PageLinkDescriptor ) {
303
+ export function PrefetchPageLinks ( { page, ...linkProps } : PageLinkDescriptor ) {
307
304
let { router } = useDataRouterContext ( ) ;
308
305
let matches = React . useMemo (
309
306
( ) => matchRoutes ( router . routes , page , router . basename ) ,
@@ -314,9 +311,7 @@ export function PrefetchPageLinks({
314
311
return null ;
315
312
}
316
313
317
- return (
318
- < PrefetchPageLinksImpl page = { page } matches = { matches } { ...dataLinkProps } />
319
- ) ;
314
+ return < PrefetchPageLinksImpl page = { page } matches = { matches } { ...linkProps } /> ;
320
315
}
321
316
322
317
function useKeyedPrefetchLinks ( matches : AgnosticDataRouteMatch [ ] ) {
@@ -685,12 +680,12 @@ export type ScriptsProps = Omit<
685
680
* @public
686
681
* @category Components
687
682
* @mode framework
688
- * @param props Props for the
683
+ * @param scriptProps Additional props to spread onto the
689
684
* [`<script>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script)
690
685
* tag, such as `crossOrigin`, `nonce`, etc.
691
686
* @returns A collection of React elements for `<script>` tags
692
687
*/
693
- export function Scripts ( props : ScriptsProps ) : React . JSX . Element | null {
688
+ export function Scripts ( scriptProps : ScriptsProps ) : React . JSX . Element | null {
694
689
let {
695
690
manifest,
696
691
serverHandoffString,
@@ -822,13 +817,13 @@ import(${JSON.stringify(manifest.entry.module)});`;
822
817
return (
823
818
< >
824
819
< script
825
- { ...props }
820
+ { ...scriptProps }
826
821
suppressHydrationWarning
827
822
dangerouslySetInnerHTML = { createHtml ( contextScript ) }
828
823
type = { undefined }
829
824
/>
830
825
< script
831
- { ...props }
826
+ { ...scriptProps }
832
827
suppressHydrationWarning
833
828
dangerouslySetInnerHTML = { createHtml ( routeModulesScript ) }
834
829
type = "module"
@@ -878,15 +873,15 @@ import(${JSON.stringify(manifest.entry.module)});`;
878
873
< link
879
874
rel = "modulepreload"
880
875
href = { manifest . url }
881
- crossOrigin = { props . crossOrigin }
876
+ crossOrigin = { scriptProps . crossOrigin }
882
877
integrity = { sri [ manifest . url ] }
883
878
suppressHydrationWarning
884
879
/>
885
880
) : null }
886
881
< link
887
882
rel = "modulepreload"
888
883
href = { manifest . entry . module }
889
- crossOrigin = { props . crossOrigin }
884
+ crossOrigin = { scriptProps . crossOrigin }
890
885
integrity = { sri [ manifest . entry . module ] }
891
886
suppressHydrationWarning
892
887
/>
@@ -895,7 +890,7 @@ import(${JSON.stringify(manifest.entry.module)});`;
895
890
key = { path }
896
891
rel = "modulepreload"
897
892
href = { path }
898
- crossOrigin = { props . crossOrigin }
893
+ crossOrigin = { scriptProps . crossOrigin }
899
894
integrity = { sri [ path ] }
900
895
suppressHydrationWarning
901
896
/>
0 commit comments