Skip to content

Commit

Permalink
Fix type error by removing generic injected type (not needed since #1…
Browse files Browse the repository at this point in the history
  • Loading branch information
Philzen committed Jan 10, 2025
1 parent 9971ea5 commit 8f82626
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions packages/router/src/__tests__/router.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -925,11 +925,7 @@ test('Private is an alias for Set private', async () => {
const TestRouter = () => (
<Router useAuth={mockUseAuth({ isAuthenticated: true })}>
<Route path="/" page={HomePage} name="home" />
<Private<PrivateLayoutProps>
wrap={PrivateLayout}
unauthenticated="home"
theme="dark"
>
<Private wrap={PrivateLayout} unauthenticated="home" theme="dark">
<Route path="/private" page={PrivatePage} name="private" />
</Private>
</Router>
Expand Down Expand Up @@ -1228,11 +1224,7 @@ describe('Multiple nested private sets', () => {
const TestRouter = ({ useAuthMock }: { useAuthMock: UseAuth }) => (
<Router useAuth={useAuthMock}>
<Route path="/" page={HomePage} name="home" />
<PrivateSet<LevelLayoutProps>
unauthenticated="home"
level="1"
wrap={LevelLayout}
>
<PrivateSet unauthenticated="home" level="1" wrap={LevelLayout}>
<Route
path="/no-roles-assigned"
page={PrivateNoRolesAssigned}
Expand Down Expand Up @@ -1357,7 +1349,7 @@ describe('Multiple nested sets', () => {
const TestRouter = () => (
<Router>
<Route path="/" page={HomePage} name="home" />
<Set<DebugLayoutProps> level="1" theme="blue" wrap={DebugLayout}>
<Set level="1" theme="blue" wrap={DebugLayout}>
<Route path="/level1" page={Page} name="level1" />
<Set level="2" theme="red" otherProp="bazinga">
<Route path="/level2" page={Page} name="level2" />
Expand Down

0 comments on commit 8f82626

Please sign in to comment.