From 4429e4e0beef52ac06847837ea80a0dfd5ed6136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Leszczyk?= Date: Sat, 26 Feb 2022 12:53:12 +0100 Subject: [PATCH] style(dashboard-v2): use PropTypes.elementType --- .../src/components/Tabs/ActiveTabIndicator.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/dashboard-v2/src/components/Tabs/ActiveTabIndicator.js b/packages/dashboard-v2/src/components/Tabs/ActiveTabIndicator.js index e39a5f08..cb14cece 100644 --- a/packages/dashboard-v2/src/components/Tabs/ActiveTabIndicator.js +++ b/packages/dashboard-v2/src/components/Tabs/ActiveTabIndicator.js @@ -35,9 +35,6 @@ 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 = { - tabRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.instanceOf(Element) })]), - }; -} +ActiveTabIndicator.propTypes = { + tabRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.elementType })]), +};