Revert "style(dashboard-v2): use PropTypes.elementType"

This reverts commit 4429e4e0be.
This commit is contained in:
Michał Leszczyk 2022-02-28 10:15:29 +01:00
parent 5123a23e33
commit 7f26c95b48
No known key found for this signature in database
GPG Key ID: FA123CA8BAA2FBF4
1 changed files with 6 additions and 3 deletions

View File

@ -35,6 +35,9 @@ export const ActiveTabIndicator = ({ tabRef }) => {
); );
}; };
// Needed, because we're using an Element constant here which Gatsby doesn't recognize during build time.
if (typeof window !== "undefined") {
ActiveTabIndicator.propTypes = { ActiveTabIndicator.propTypes = {
tabRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.elementType })]), tabRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.instanceOf(Element) })]),
}; };
}