Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Undo PropsWithChildren, try lower timeout
  • Loading branch information
presleyp committed Aug 25, 2022
commit 4f975b86faf43340d4edfff3d9a42223c2a33220
6 changes: 3 additions & 3 deletions site/src/components/Navbar/Navbar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe("Navbar", () => {
const link = screen.getByText(Language.audit)
expect(link).toBeDefined()
},
{ timeout: 5000 },
{ timeout: 2500 },
)
})

Expand All @@ -40,7 +40,7 @@ describe("Navbar", () => {
const link = screen.queryByText(Language.audit)
expect(link).toBe(null)
},
{ timeout: 5000 },
{ timeout: 2500 },
)
})

Expand All @@ -63,7 +63,7 @@ describe("Navbar", () => {
const link = screen.queryByText(Language.audit)
expect(link).toBe(null)
},
{ timeout: 5000 },
{ timeout: 2500 },
)
})
})
6 changes: 3 additions & 3 deletions site/src/components/RequirePermission/RequirePermission.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { FC, PropsWithChildren } from "react"
import { FC } from "react"
import { Navigate } from "react-router"

export type RequirePermissionProps = PropsWithChildren<{
export interface RequirePermissionProps {
children: JSX.Element
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would PropsWithChildren help here? reference

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried using it here and got a TS error, not sure why!

Copy link
Contributor

isFeatureVisible: boolean
}>
}

/**
* Wraps routes that are available based on RBAC or licensing.
Expand Down