Skip to content

Commit

Permalink
RSC: Remove one level of nesting for server-router (#10539)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobbe committed May 3, 2024
1 parent b862c6e commit deed7e8
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions packages/router/src/server-router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,6 @@ export interface RouterProps
}

export const Router: React.FC<RouterProps> = ({
useAuth,
paramTypes,
pageLoadingDelay,
children,
location,
}) => {
return (
// Level 1/3 (outer-most)
<LocationAwareRouter
useAuth={useAuth}
paramTypes={paramTypes}
pageLoadingDelay={pageLoadingDelay}
location={location}
>
{children}
</LocationAwareRouter>
)
}

const LocationAwareRouter: React.FC<RouterProps> = ({
paramTypes,
children,
location,
Expand Down Expand Up @@ -135,7 +115,6 @@ const LocationAwareRouter: React.FC<RouterProps> = ({
}
}

// Level 2/3 (LocationAwareRouter)
return (
<>
{!redirectPath && page && (
Expand Down

0 comments on commit deed7e8

Please sign in to comment.