From a8ec6e7060ee1dc1d8c5cdab4929447fc31a70f6 Mon Sep 17 00:00:00 2001 From: Peer Richelsen Date: Fri, 24 Sep 2021 16:03:28 +0100 Subject: [PATCH] replaced window.location with NEXT_PUBLIC_APP_URL (#769) * replaced window.location with process.env.NEXT_PUBLIC_APP_URL, removed empty classNames * wip --- components/Tooltip.tsx | 7 +++---- components/team/EditTeam.tsx | 2 +- components/team/TeamListItem.tsx | 13 ++++++++----- components/ui/Schedule/Schedule.tsx | 2 +- components/ui/Scheduler.tsx | 2 +- components/ui/UsernameInput.tsx | 2 +- pages/bookings/index.tsx | 10 ++++++++-- pages/event-types/index.tsx | 7 +++++-- pages/getting-started.tsx | 2 +- 9 files changed, 29 insertions(+), 18 deletions(-) diff --git a/components/Tooltip.tsx b/components/Tooltip.tsx index 1148d125..7103c0ff 100644 --- a/components/Tooltip.tsx +++ b/components/Tooltip.tsx @@ -9,12 +9,11 @@ export function Tooltip({ onOpenChange, ...props }: { - [x: string]: any; children: React.ReactNode; content: React.ReactNode; - open: boolean; - defaultOpen: boolean; - onOpenChange: (open: boolean) => void; + open?: boolean; + defaultOpen?: boolean; + onOpenChange?: (open: boolean) => void; }) { return ( -
+

{props.team?.name}

diff --git a/components/team/TeamListItem.tsx b/components/team/TeamListItem.tsx index ad1bf685..f0df19e6 100644 --- a/components/team/TeamListItem.tsx +++ b/components/team/TeamListItem.tsx @@ -59,19 +59,20 @@ export default function TeamListItem(props: {
{props.team.name} - {window.location.hostname}/{props.team.slug} + {process.env.NEXT_PUBLIC_APP_URL}/{props.team.slug}
@@ -100,7 +101,9 @@ export default function TeamListItem(props: { - - + +
-
+
diff --git a/components/ui/Scheduler.tsx b/components/ui/Scheduler.tsx index 5668741b..abcc4fdd 100644 --- a/components/ui/Scheduler.tsx +++ b/components/ui/Scheduler.tsx @@ -101,7 +101,7 @@ export const Scheduler = ({
-
+
diff --git a/components/ui/UsernameInput.tsx b/components/ui/UsernameInput.tsx index 2b454e13..fa458e03 100644 --- a/components/ui/UsernameInput.tsx +++ b/components/ui/UsernameInput.tsx @@ -8,7 +8,7 @@ const UsernameInput = React.forwardRef((props, ref) => ( diff --git a/pages/getting-started.tsx b/pages/getting-started.tsx index d90d5b88..2ea1a220 100644 --- a/pages/getting-started.tsx +++ b/pages/getting-started.tsx @@ -566,7 +566,7 @@ export default function Onboarding(props: OnboardingProps) {
-
+
{steps[currentStep].title}