Skip to content

Commit

Permalink
Requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
TimBroddin committed Sep 30, 2024
1 parent 9359f79 commit b1e1799
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import React, { useEffect, useMemo } from 'react';

const CALENDLY_SCRIPT_URL = 'https://assets.calendly.com/assets/external/widget.js';

declare global {
interface Window {
Calendly: any;
}
}

interface PrefillData {
type CalendlyPrefillData = {
name?: string;
email?: string;
// Add other prefill fields as needed
}
};

interface CalendlyWidgetProps {
type CalendlyWidgetProps = {
url: string;
id?: string;
prefill?: PrefillData;
prefill?: CalendlyPrefillData;
onSchedule?: () => void;
}

const CALENDLY_SCRIPT_URL = 'https://assets.calendly.com/assets/external/widget.js';
};

function isCalendlyEvent( e: MessageEvent ): boolean {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import config from '@automattic/calypso-config';
import { UserSelect } from '@automattic/data-stores';
import { useSelect } from '@wordpress/data';
import { useTranslate } from 'i18n-calypso';
Expand All @@ -9,14 +10,6 @@ import type { Step } from '../../types';

import './styles.scss';

declare global {
interface Window {
Calendly: any;
}
}

const CALENDLY_ID = 'tim-broddin-a8c/30min';

const HundredYearPlanScheduleAppointment: Step = function HundredYearPlanScheduleAppointment( {
navigation,
flow,
Expand All @@ -34,12 +27,12 @@ const HundredYearPlanScheduleAppointment: Step = function HundredYearPlanSchedul
<HundredYearPlanStepWrapper
stepContent={
<div className="hundred-year-plan-schedule-appointment-content">
<div className="hundred-year-plan-schedule-appointment-content__left-pane">
<div className="hundred-year-plan-schedule-appointment-content__start-pane">
// TODO: content
</div>
<div className="hundred-year-plan-schedule-appointment-content__right-pane">
<div className="hundred-year-plan-schedule-appointment-content__end-pane">
<CalendlyWidget
url={ CALENDLY_ID }
url={ config( '100_year_plan_calendly_id' ) }
prefill={
currentUser
? { name: currentUser?.display_name, email: currentUser?.email }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
flex-direction: row;
justify-content: space-between;

&__left-pane {
width: 50%;
&__start-pane {
flex: 1;
}

&__right-pane {
width: 50%;
&__end-pane {
flex: 1;
}

.calendly-widget {
Expand Down
1 change: 1 addition & 0 deletions config/_shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,5 +260,6 @@
"onboarding-affiliate",
"email-subscription"
],
"100_year_plan_calendly_id": "tim-broddin-a8c/30min",
"bilmur_url": "https://s0.wp.com/wp-content/js/bilmur.min.js"
}

0 comments on commit b1e1799

Please sign in to comment.