@adminide-stack/clock-tik-browser 12.0.28-alpha.2 → 12.0.28-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/HelpCenterFooter.js +4 -4
- package/lib/components/HelpCenterHeader.js +3 -3
- package/lib/components/HelpCenterHeader.js.map +1 -1
- package/lib/components/Logo.js +1 -1
- package/lib/components/SidebarSearch.js +2 -2
- package/lib/components/SidebarSearch.js.map +1 -1
- package/lib/components/navbar/ProductMegaMenu.js +3 -3
- package/lib/components/navbar/index.d.ts.map +1 -1
- package/lib/components/navbar/index.js +27 -8
- package/lib/components/navbar/index.js.map +1 -1
- package/lib/components/navbar/menuData.d.ts +2 -0
- package/lib/components/navbar/menuData.d.ts.map +1 -1
- package/lib/components/navbar/menuData.js +56 -51
- package/lib/components/navbar/menuData.js.map +1 -1
- package/lib/compute.d.ts +7 -0
- package/lib/compute.d.ts.map +1 -1
- package/lib/compute.js +20 -4
- package/lib/compute.js.map +1 -1
- package/lib/config/env-config.d.ts +2 -0
- package/lib/config/env-config.d.ts.map +1 -1
- package/lib/config/env-config.js +8 -0
- package/lib/config/env-config.js.map +1 -1
- package/lib/pages/CategoryCollection/index.js +3 -3
- package/lib/pages/Contact-us/index.js +1 -1
- package/lib/pages/Freelancers/components/MarketplaceSections.js +8 -8
- package/lib/pages/Freelancers/components/MarketplaceSections.js.map +1 -1
- package/lib/pages/Freelancers/index.js +1 -1
- package/lib/pages/GetStarted/index.js +2 -2
- package/lib/pages/HelpCenter/components/CaresHero.js +2 -2
- package/lib/pages/HelpCenter/components/CaresHero.js.map +1 -1
- package/lib/pages/HelpCenter/components/NeedHelpWithSection.d.ts.map +1 -1
- package/lib/pages/HelpCenter/components/NeedHelpWithSection.js +2 -2
- package/lib/pages/HelpCenter/components/NeedHelpWithSection.js.map +1 -1
- package/lib/pages/HelpCenter/index.js +1 -1
- package/lib/pages/Home/HomePage.d.ts +2 -0
- package/lib/pages/Home/HomePage.d.ts.map +1 -0
- package/lib/pages/Home/HomePage.js +876 -0
- package/lib/pages/Home/HomePage.js.map +1 -0
- package/lib/pages/Home/Logo.d.ts +14 -0
- package/lib/pages/Home/Logo.d.ts.map +1 -0
- package/lib/pages/Home/Logo.js +69 -0
- package/lib/pages/Home/Logo.js.map +1 -0
- package/lib/pages/Home/__tests__/status.test.d.ts +2 -0
- package/lib/pages/Home/__tests__/status.test.d.ts.map +1 -0
- package/lib/pages/Home/__tests__/thread.test.d.ts +2 -0
- package/lib/pages/Home/__tests__/thread.test.d.ts.map +1 -0
- package/lib/pages/Home/assets.d.ts +15 -0
- package/lib/pages/Home/assets.d.ts.map +1 -0
- package/lib/pages/Home/assets.js +19 -0
- package/lib/pages/Home/assets.js.map +1 -0
- package/lib/pages/Home/business.d.ts +5 -0
- package/lib/pages/Home/business.d.ts.map +1 -0
- package/lib/pages/Home/business.js +8 -0
- package/lib/pages/Home/business.js.map +1 -0
- package/lib/pages/Home/chat/ChoresChat.d.ts +19 -0
- package/lib/pages/Home/chat/ChoresChat.d.ts.map +1 -0
- package/lib/pages/Home/chat/ChoresChat.js +300 -0
- package/lib/pages/Home/chat/ChoresChat.js.map +1 -0
- package/lib/pages/Home/chat/chatTheme.d.ts +8 -0
- package/lib/pages/Home/chat/chatTheme.d.ts.map +1 -0
- package/lib/pages/Home/chat/chatTheme.js +43 -0
- package/lib/pages/Home/chat/chatTheme.js.map +1 -0
- package/lib/pages/Home/chat/lucy.d.ts +8 -0
- package/lib/pages/Home/chat/lucy.d.ts.map +1 -0
- package/lib/pages/Home/chat/lucy.js +7 -0
- package/lib/pages/Home/chat/lucy.js.map +1 -0
- package/lib/pages/Home/chat/status.d.ts +6 -0
- package/lib/pages/Home/chat/status.d.ts.map +1 -0
- package/lib/pages/Home/chat/status.js +7 -0
- package/lib/pages/Home/chat/status.js.map +1 -0
- package/lib/pages/Home/chat/thread.d.ts +31 -0
- package/lib/pages/Home/chat/thread.d.ts.map +1 -0
- package/lib/pages/Home/chat/thread.js +102 -0
- package/lib/pages/Home/chat/thread.js.map +1 -0
- package/lib/pages/Home/content.d.ts +59 -0
- package/lib/pages/Home/content.d.ts.map +1 -0
- package/lib/pages/Home/content.js +205 -0
- package/lib/pages/Home/content.js.map +1 -0
- package/lib/pages/Home/homeStyles.d.ts +9 -0
- package/lib/pages/Home/homeStyles.d.ts.map +1 -0
- package/lib/pages/Home/homeStyles.js +983 -0
- package/lib/pages/Home/homeStyles.js.map +1 -0
- package/lib/pages/Home/index.d.ts +127 -0
- package/lib/pages/Home/index.d.ts.map +1 -0
- package/lib/pages/Home/index.js +152 -0
- package/lib/pages/Home/index.js.map +1 -0
- package/lib/pages/Home/platform.d.ts +7 -0
- package/lib/pages/Home/platform.d.ts.map +1 -0
- package/lib/pages/Home/platform.js +23 -0
- package/lib/pages/Home/platform.js.map +1 -0
- package/lib/pages/LandingPage/components/BooksFeatureSection.js +2 -2
- package/lib/pages/LandingPage/components/HRMFeatureSection.js +2 -2
- package/lib/pages/LandingPage/components/TimerBarSection.js +2 -2
- package/lib/pages/LandingPage/index.js +2 -2
- package/lib/pages/Markdown/MarkdownPageWithParams.js +2 -2
- package/lib/pages/Pricing/index.js +3 -3
- package/lib/pages/ProductLandingPage/demoVideos.d.ts +5 -1
- package/lib/pages/ProductLandingPage/demoVideos.d.ts.map +1 -1
- package/lib/pages/ProductLandingPage/demoVideos.js +25 -3
- package/lib/pages/ProductLandingPage/demoVideos.js.map +1 -1
- package/lib/pages/ProductLandingPage/derivePage.js +10 -10
- package/lib/pages/ProductLandingPage/index.d.ts.map +1 -1
- package/lib/pages/ProductLandingPage/index.js +8 -8
- package/lib/pages/ProductLandingPage/index.js.map +1 -1
- package/lib/pages/ProductLandingPage/productPages.d.ts.map +1 -1
- package/lib/pages/ProductLandingPage/productPages.js +33 -33
- package/lib/pages/ProductLandingPage/productPages.js.map +1 -1
- package/lib/pages/ProductLandingPage/realProductPages.d.ts.map +1 -1
- package/lib/pages/ProductLandingPage/realProductPages.js +50 -50
- package/lib/pages/ProductLandingPage/realProductPages.js.map +1 -1
- package/lib/pages/Products/index.js +40 -40
- package/lib/pages/Products/index.js.map +1 -1
- package/lib/pages/Thanks/index.js +1 -1
- package/lib/routes.json +41 -29
- package/lib/templates/content/docs/import-timesheets.md +1 -1
- package/lib/templates/static/home/clockbook-logo.svg +7 -0
- package/lib/templates/static/home/loop-day.jpg +0 -0
- package/lib/templates/static/home/loop-day.mp4 +0 -0
- package/lib/templates/static/home/loop-time-back.jpg +0 -0
- package/lib/templates/static/home/loop-time-back.mp4 +0 -0
- package/lib/templates/static/home/loop-where.jpg +0 -0
- package/lib/templates/static/home/loop-where.mp4 +0 -0
- package/lib/templates/static/home/og-image.jpg +0 -0
- package/lib/templates/static/home/reel-gym.jpg +0 -0
- package/lib/templates/static/home/reel-gym.mp4 +0 -0
- package/lib/templates/static/home/reel-internet.jpg +0 -0
- package/lib/templates/static/home/reel-internet.mp4 +0 -0
- package/package.json +6 -4
|
@@ -0,0 +1,876 @@
|
|
|
1
|
+
import {jsxs,jsx}from'react/jsx-runtime';import {useState,useRef,useCallback,useEffect,Suspense,lazy}from'react';import {createPortal}from'react-dom';import {Briefcase,PhoneCall,Plane,Wrench,Users,ShoppingCart,RefreshCcw,Receipt,ArrowRight,Workflow,BookOpen,Timer,ArrowUp,PackageOpen,Landmark,Smile,UtensilsCrossed,CalendarClock,Play}from'lucide-react';import {canLogin,beginLogin,captureLoginCallback,reconcileStoredToken,clearCdecliToken,hasCdecliToken,tokenExpiringSoon}from'@yantra/surface-kit/auth';import {businessHref}from'./business.js';import {ensurePlatformAnchor,appChatLink}from'./platform.js';import {HOME_ASSETS}from'./assets.js';import {HomeStyles}from'./homeStyles.js';import {savePendingChore,takePendingChore}from'./chat/thread.js';import {MINUTES,HERO_CHORES,VIDEO_NOTE,HOUSEWORK_MIN,AREAS,STEPS,BUSINESS_PRODUCTS,FOOTNOTE,BUSINESS_LINKS}from'./content.js';import {Mark,AnimatedMark}from'./Logo.js';const AREA_ICONS = {
|
|
2
|
+
bills: Receipt,
|
|
3
|
+
subscriptions: RefreshCcw,
|
|
4
|
+
groceries: ShoppingCart,
|
|
5
|
+
family: Users,
|
|
6
|
+
home: Wrench,
|
|
7
|
+
travel: Plane
|
|
8
|
+
};
|
|
9
|
+
const CHORE_ICONS = {
|
|
10
|
+
schedule: CalendarClock,
|
|
11
|
+
call: PhoneCall,
|
|
12
|
+
bill: Receipt,
|
|
13
|
+
meals: UtensilsCrossed,
|
|
14
|
+
dentist: Smile,
|
|
15
|
+
travel: Plane,
|
|
16
|
+
bank: Landmark,
|
|
17
|
+
return: PackageOpen
|
|
18
|
+
};
|
|
19
|
+
const BUSINESS_ICONS = {
|
|
20
|
+
time: Timer,
|
|
21
|
+
hr: Users,
|
|
22
|
+
books: BookOpen,
|
|
23
|
+
workflows: Workflow
|
|
24
|
+
};
|
|
25
|
+
const REELS = [{
|
|
26
|
+
src: HOME_ASSETS.reelInternet,
|
|
27
|
+
poster: HOME_ASSETS.reelInternetPoster,
|
|
28
|
+
title: 'Internet bill',
|
|
29
|
+
result: '$420 a year back',
|
|
30
|
+
label: 'Lucy calls the internet provider and gets a lower rate'
|
|
31
|
+
}, {
|
|
32
|
+
src: HOME_ASSETS.reelGym,
|
|
33
|
+
poster: HOME_ASSETS.reelGymPoster,
|
|
34
|
+
title: 'Gym membership',
|
|
35
|
+
result: 'Cancelled by phone, $600 a year back',
|
|
36
|
+
label: 'Lucy calls the gym, declines three offers and cancels'
|
|
37
|
+
}];
|
|
38
|
+
/** The longest chore the composer takes. */
|
|
39
|
+
const PROMPT_MAX = 2000;
|
|
40
|
+
/** The page's chat, fetched the first time it is needed (or when the composer is focused). */
|
|
41
|
+
const loadChat = () => import('./chat/ChoresChat.js');
|
|
42
|
+
const ChoresChat = lazy(loadChat);
|
|
43
|
+
/** Signed in, with a token that is not about to lapse. */
|
|
44
|
+
function hasLiveToken() {
|
|
45
|
+
return hasCdecliToken() && !tokenExpiringSoon(30);
|
|
46
|
+
}
|
|
47
|
+
/** The address bar says when the chat is open, so Back returns to the landing. */
|
|
48
|
+
const CHAT_HASH = '#chat';
|
|
49
|
+
function usePrefersReducedMotion() {
|
|
50
|
+
const [reduced, setReduced] = useState(false);
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
const query = window.matchMedia?.('(prefers-reduced-motion: reduce)');
|
|
53
|
+
if (!query) return;
|
|
54
|
+
setReduced(query.matches);
|
|
55
|
+
const onChange = e => setReduced(e.matches);
|
|
56
|
+
query.addEventListener('change', onChange);
|
|
57
|
+
return () => query.removeEventListener('change', onChange);
|
|
58
|
+
}, []);
|
|
59
|
+
return reduced;
|
|
60
|
+
}
|
|
61
|
+
/** A silent animation that loops; a still poster when the visitor prefers reduced motion. */
|
|
62
|
+
function Loop({
|
|
63
|
+
src,
|
|
64
|
+
poster,
|
|
65
|
+
label
|
|
66
|
+
}) {
|
|
67
|
+
const reduced = usePrefersReducedMotion();
|
|
68
|
+
if (reduced) return jsx("img", {
|
|
69
|
+
className: "cbh-loop",
|
|
70
|
+
src: poster,
|
|
71
|
+
alt: label
|
|
72
|
+
});
|
|
73
|
+
return jsx("video", {
|
|
74
|
+
className: "cbh-loop",
|
|
75
|
+
src: src,
|
|
76
|
+
poster: poster,
|
|
77
|
+
autoPlay: true,
|
|
78
|
+
muted: true,
|
|
79
|
+
loop: true,
|
|
80
|
+
playsInline: true,
|
|
81
|
+
preload: "metadata",
|
|
82
|
+
"aria-label": label
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/** A reel shows its poster until tapped, then plays with sound. */
|
|
86
|
+
function Reel({
|
|
87
|
+
src,
|
|
88
|
+
poster,
|
|
89
|
+
title,
|
|
90
|
+
result,
|
|
91
|
+
label
|
|
92
|
+
}) {
|
|
93
|
+
const [playing, setPlaying] = useState(false);
|
|
94
|
+
return jsxs("figure", {
|
|
95
|
+
className: "cbh-reel",
|
|
96
|
+
children: [jsx("div", {
|
|
97
|
+
className: "cbh-reel-frame",
|
|
98
|
+
children: playing ? jsx("video", {
|
|
99
|
+
src: src,
|
|
100
|
+
poster: poster,
|
|
101
|
+
autoPlay: true,
|
|
102
|
+
controls: true,
|
|
103
|
+
playsInline: true,
|
|
104
|
+
"aria-label": label
|
|
105
|
+
}) : jsxs("button", {
|
|
106
|
+
type: "button",
|
|
107
|
+
className: "cbh-reel-poster",
|
|
108
|
+
onClick: () => setPlaying(true),
|
|
109
|
+
"aria-label": `Play: ${label}`,
|
|
110
|
+
children: [jsx("img", {
|
|
111
|
+
src: poster,
|
|
112
|
+
alt: ""
|
|
113
|
+
}), jsx("span", {
|
|
114
|
+
className: "cbh-reel-play",
|
|
115
|
+
"aria-hidden": true,
|
|
116
|
+
children: jsx(Play, {
|
|
117
|
+
size: 26,
|
|
118
|
+
fill: "currentColor"
|
|
119
|
+
})
|
|
120
|
+
})]
|
|
121
|
+
})
|
|
122
|
+
}), jsxs("figcaption", {
|
|
123
|
+
children: [jsx("b", {
|
|
124
|
+
children: title
|
|
125
|
+
}), jsx("span", {
|
|
126
|
+
children: result
|
|
127
|
+
})]
|
|
128
|
+
})]
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
/** One chore: a button that hands it over. Hero chores wear their icon in front. */
|
|
132
|
+
function ChoreChip({
|
|
133
|
+
chore,
|
|
134
|
+
onChore
|
|
135
|
+
}) {
|
|
136
|
+
const Icon = chore.icon ? CHORE_ICONS[chore.icon] : null;
|
|
137
|
+
return jsxs("button", {
|
|
138
|
+
type: "button",
|
|
139
|
+
className: "cbh-chip",
|
|
140
|
+
onClick: () => onChore(chore.prompt),
|
|
141
|
+
children: [Icon ? jsx(Icon, {
|
|
142
|
+
size: 16,
|
|
143
|
+
"aria-hidden": true
|
|
144
|
+
}) : null, chore.label, Icon ? null : jsx(ArrowRight, {
|
|
145
|
+
size: 16,
|
|
146
|
+
"aria-hidden": true
|
|
147
|
+
})]
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* The chore composer, shaped like the Yantra app's home box: a few lines to say it the way you
|
|
152
|
+
* would text it, Enter to hand it over (Shift+Enter for a new line).
|
|
153
|
+
*/
|
|
154
|
+
function Composer({
|
|
155
|
+
id,
|
|
156
|
+
large,
|
|
157
|
+
onSubmit,
|
|
158
|
+
onWarm,
|
|
159
|
+
inputRef
|
|
160
|
+
}) {
|
|
161
|
+
const [text, setText] = useState('');
|
|
162
|
+
const fieldRef = useRef(null);
|
|
163
|
+
const ready = text.trim().length > 0;
|
|
164
|
+
// Grow with the chore, up to the cap in home.css, then scroll.
|
|
165
|
+
useEffect(() => {
|
|
166
|
+
const el = fieldRef.current;
|
|
167
|
+
if (!el) return;
|
|
168
|
+
el.style.height = 'auto';
|
|
169
|
+
el.style.height = `${el.scrollHeight}px`;
|
|
170
|
+
}, [text]);
|
|
171
|
+
const submit = e => {
|
|
172
|
+
e?.preventDefault();
|
|
173
|
+
if (!ready) return;
|
|
174
|
+
onSubmit(text.trim());
|
|
175
|
+
setText('');
|
|
176
|
+
};
|
|
177
|
+
const onKeyDown = e => {
|
|
178
|
+
if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) submit(e);
|
|
179
|
+
};
|
|
180
|
+
const setRefs = el => {
|
|
181
|
+
fieldRef.current = el;
|
|
182
|
+
if (typeof inputRef === 'function') inputRef(el);else if (inputRef) inputRef.current = el;
|
|
183
|
+
};
|
|
184
|
+
return jsxs("form", {
|
|
185
|
+
className: `cbh-composer${large ? ' cbh-composer-large' : ''}`,
|
|
186
|
+
onSubmit: submit,
|
|
187
|
+
onClick: () => fieldRef.current?.focus(),
|
|
188
|
+
children: [jsx("label", {
|
|
189
|
+
htmlFor: id,
|
|
190
|
+
className: "cbh-visually-hidden",
|
|
191
|
+
children: "A chore to hand over"
|
|
192
|
+
}), jsx("textarea", {
|
|
193
|
+
id: id,
|
|
194
|
+
ref: setRefs,
|
|
195
|
+
rows: 2,
|
|
196
|
+
value: text,
|
|
197
|
+
maxLength: PROMPT_MAX,
|
|
198
|
+
onChange: e => setText(e.target.value),
|
|
199
|
+
onKeyDown: onKeyDown,
|
|
200
|
+
onFocus: onWarm,
|
|
201
|
+
placeholder: "What should Lucy take off your plate?",
|
|
202
|
+
autoComplete: "off"
|
|
203
|
+
}), jsxs("div", {
|
|
204
|
+
className: "cbh-composer-row",
|
|
205
|
+
children: [jsxs("span", {
|
|
206
|
+
className: "cbh-composer-hint",
|
|
207
|
+
children: [jsx(PhoneCall, {
|
|
208
|
+
size: 15,
|
|
209
|
+
"aria-hidden": true
|
|
210
|
+
}), "Lucy calls, books and keeps track"]
|
|
211
|
+
}), jsx("button", {
|
|
212
|
+
type: "submit",
|
|
213
|
+
className: "cbh-send",
|
|
214
|
+
disabled: !ready,
|
|
215
|
+
"aria-label": "Hand it over",
|
|
216
|
+
children: jsx(ArrowUp, {
|
|
217
|
+
size: 20,
|
|
218
|
+
strokeWidth: 2.4,
|
|
219
|
+
"aria-hidden": true
|
|
220
|
+
})
|
|
221
|
+
})]
|
|
222
|
+
})]
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
/** Sign in before the chore runs. The chore waits in this tab and goes out when they are back. */
|
|
226
|
+
function SignInDialog({
|
|
227
|
+
chore,
|
|
228
|
+
expired,
|
|
229
|
+
onContinue,
|
|
230
|
+
onCancel
|
|
231
|
+
}) {
|
|
232
|
+
const continueRef = useRef(null);
|
|
233
|
+
useEffect(() => {
|
|
234
|
+
continueRef.current?.focus();
|
|
235
|
+
const onKey = e => {
|
|
236
|
+
if (e.key === 'Escape') onCancel();
|
|
237
|
+
};
|
|
238
|
+
document.addEventListener('keydown', onKey);
|
|
239
|
+
return () => document.removeEventListener('keydown', onKey);
|
|
240
|
+
}, [onCancel]);
|
|
241
|
+
const title = expired ? 'Sign in again to carry on' : chore ? 'Sign in to hand it over' : 'Sign in to Clockbook';
|
|
242
|
+
return jsx("div", {
|
|
243
|
+
className: "cbh-dialog-backdrop",
|
|
244
|
+
onClick: e => e.target === e.currentTarget && onCancel(),
|
|
245
|
+
children: jsxs("div", {
|
|
246
|
+
className: "cbh-dialog",
|
|
247
|
+
role: "dialog",
|
|
248
|
+
"aria-modal": "true",
|
|
249
|
+
"aria-labelledby": "cbh-dialog-title",
|
|
250
|
+
children: [jsx("span", {
|
|
251
|
+
className: "cbh-dialog-mark",
|
|
252
|
+
"aria-hidden": true,
|
|
253
|
+
children: jsx(Mark, {
|
|
254
|
+
size: 44
|
|
255
|
+
})
|
|
256
|
+
}), jsx("h2", {
|
|
257
|
+
id: "cbh-dialog-title",
|
|
258
|
+
className: "cbh-dialog-title",
|
|
259
|
+
children: title
|
|
260
|
+
}), chore ? jsxs("p", {
|
|
261
|
+
className: "cbh-dialog-chore",
|
|
262
|
+
children: ["\u201C", chore, "\u201D"]
|
|
263
|
+
}) : null, jsx("p", {
|
|
264
|
+
className: "cbh-dialog-body",
|
|
265
|
+
children: expired ? 'Your sign-in ran out. Sign in and Lucy picks this up again.' : chore ? 'Sign in or create an account, and Lucy starts on this as soon as you are back.' : 'Sign in or create an account to hand your chores to Lucy.'
|
|
266
|
+
}), jsxs("button", {
|
|
267
|
+
ref: continueRef,
|
|
268
|
+
type: "button",
|
|
269
|
+
className: "cbh-btn",
|
|
270
|
+
onClick: onContinue,
|
|
271
|
+
children: ["Continue to sign in", jsx(ArrowRight, {
|
|
272
|
+
size: 18,
|
|
273
|
+
"aria-hidden": true
|
|
274
|
+
})]
|
|
275
|
+
}), jsx("button", {
|
|
276
|
+
type: "button",
|
|
277
|
+
className: "cbh-dialog-cancel",
|
|
278
|
+
onClick: onCancel,
|
|
279
|
+
children: "Not now"
|
|
280
|
+
}), jsx("p", {
|
|
281
|
+
className: "cbh-dialog-fine",
|
|
282
|
+
children: "You sign in with Yantra, which Clockbook runs on, then come straight back here."
|
|
283
|
+
})]
|
|
284
|
+
})
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
const CHAT_CLOSED = {
|
|
288
|
+
mounted: false,
|
|
289
|
+
open: false,
|
|
290
|
+
request: null
|
|
291
|
+
};
|
|
292
|
+
function HomePage() {
|
|
293
|
+
const totalMin = MINUTES.reduce((sum, m) => sum + m.min, 0);
|
|
294
|
+
const [signedIn, setSignedIn] = useState(false);
|
|
295
|
+
const [chat, setChat] = useState(CHAT_CLOSED);
|
|
296
|
+
const [signIn, setSignIn] = useState(null);
|
|
297
|
+
const heroFieldRef = useRef(null);
|
|
298
|
+
const warmChat = useCallback(() => {
|
|
299
|
+
void loadChat();
|
|
300
|
+
}, []);
|
|
301
|
+
const openChat = useCallback(chore => {
|
|
302
|
+
const text = chore.trim();
|
|
303
|
+
setChat(c => ({
|
|
304
|
+
mounted: true,
|
|
305
|
+
open: true,
|
|
306
|
+
request: text ? {
|
|
307
|
+
text,
|
|
308
|
+
key: Date.now()
|
|
309
|
+
} : c.request
|
|
310
|
+
}));
|
|
311
|
+
if (window.location.hash !== CHAT_HASH) window.history.pushState(null, '', CHAT_HASH);
|
|
312
|
+
}, []);
|
|
313
|
+
const closeChat = useCallback(() => {
|
|
314
|
+
setChat(c => ({
|
|
315
|
+
...c,
|
|
316
|
+
open: false
|
|
317
|
+
}));
|
|
318
|
+
if (window.location.hash === CHAT_HASH) {
|
|
319
|
+
window.history.replaceState(null, '', window.location.pathname + window.location.search);
|
|
320
|
+
}
|
|
321
|
+
}, []);
|
|
322
|
+
const endChat = useCallback(() => {
|
|
323
|
+
setChat(CHAT_CLOSED);
|
|
324
|
+
if (window.location.hash === CHAT_HASH) {
|
|
325
|
+
window.history.replaceState(null, '', window.location.pathname + window.location.search);
|
|
326
|
+
}
|
|
327
|
+
}, []);
|
|
328
|
+
/** Every chore on the page lands here: the page's chat, sign-in first, or the app as a last resort. */
|
|
329
|
+
const handOver = useCallback(chore => {
|
|
330
|
+
ensurePlatformAnchor();
|
|
331
|
+
if (hasLiveToken()) openChat(chore);else if (canLogin()) setSignIn({
|
|
332
|
+
chore: chore.trim()
|
|
333
|
+
});else window.location.assign(appChatLink(chore));
|
|
334
|
+
}, [openChat]);
|
|
335
|
+
const continueSignIn = useCallback(() => {
|
|
336
|
+
ensurePlatformAnchor();
|
|
337
|
+
savePendingChore(signIn?.chore ?? '');
|
|
338
|
+
beginLogin('clockbook-home');
|
|
339
|
+
}, [signIn]);
|
|
340
|
+
// Back from sign-in: keep the token it brought, and send the chore that waited for it.
|
|
341
|
+
useEffect(() => {
|
|
342
|
+
ensurePlatformAnchor();
|
|
343
|
+
captureLoginCallback();
|
|
344
|
+
const live = hasLiveToken();
|
|
345
|
+
setSignedIn(live);
|
|
346
|
+
const pending = takePendingChore();
|
|
347
|
+
if (live && pending) openChat(pending);else if (live && window.location.hash === CHAT_HASH) openChat('');else if (window.location.hash === CHAT_HASH) window.history.replaceState(null, '', window.location.pathname + window.location.search);
|
|
348
|
+
// Where the page shares the app's session cookie (a cdebase.dev host next to the dev app),
|
|
349
|
+
// a token left by another account is dropped here. On clockbook.com there is no session to
|
|
350
|
+
// compare with, and the token stays until it is refused or the visitor signs out.
|
|
351
|
+
let live2 = true;
|
|
352
|
+
void reconcileStoredToken().then(verdict => {
|
|
353
|
+
if (!live2 || verdict !== 'dropped') return;
|
|
354
|
+
setSignedIn(false);
|
|
355
|
+
endChat();
|
|
356
|
+
});
|
|
357
|
+
return () => {
|
|
358
|
+
live2 = false;
|
|
359
|
+
};
|
|
360
|
+
}, [endChat, openChat]);
|
|
361
|
+
// Back and Forward move between the landing and the chat.
|
|
362
|
+
useEffect(() => {
|
|
363
|
+
const onPop = () => {
|
|
364
|
+
const wantsChat = window.location.hash === CHAT_HASH;
|
|
365
|
+
setChat(c => wantsChat && !c.mounted && !hasLiveToken() ? c : {
|
|
366
|
+
...c,
|
|
367
|
+
mounted: c.mounted || wantsChat,
|
|
368
|
+
open: wantsChat
|
|
369
|
+
});
|
|
370
|
+
};
|
|
371
|
+
window.addEventListener('popstate', onPop);
|
|
372
|
+
return () => window.removeEventListener('popstate', onPop);
|
|
373
|
+
}, []);
|
|
374
|
+
// The landing does not scroll behind the open chat.
|
|
375
|
+
useEffect(() => {
|
|
376
|
+
if (!chat.open) return;
|
|
377
|
+
const root = document.documentElement;
|
|
378
|
+
const before = root.style.overflow;
|
|
379
|
+
root.style.overflow = 'hidden';
|
|
380
|
+
return () => {
|
|
381
|
+
root.style.overflow = before;
|
|
382
|
+
};
|
|
383
|
+
}, [chat.open]);
|
|
384
|
+
const onSignedOut = useCallback(() => {
|
|
385
|
+
setSignedIn(false);
|
|
386
|
+
endChat();
|
|
387
|
+
}, [endChat]);
|
|
388
|
+
const onSessionExpired = useCallback(chore => {
|
|
389
|
+
clearCdecliToken();
|
|
390
|
+
setSignedIn(false);
|
|
391
|
+
endChat();
|
|
392
|
+
setSignIn({
|
|
393
|
+
chore,
|
|
394
|
+
expired: true
|
|
395
|
+
});
|
|
396
|
+
}, [endChat]);
|
|
397
|
+
const tryIt = () => {
|
|
398
|
+
if (signedIn) {
|
|
399
|
+
openChat('');
|
|
400
|
+
return;
|
|
401
|
+
}
|
|
402
|
+
window.scrollTo({
|
|
403
|
+
top: 0,
|
|
404
|
+
behavior: 'smooth'
|
|
405
|
+
});
|
|
406
|
+
heroFieldRef.current?.focus({
|
|
407
|
+
preventScroll: true
|
|
408
|
+
});
|
|
409
|
+
};
|
|
410
|
+
return jsxs("div", {
|
|
411
|
+
className: "cbh",
|
|
412
|
+
children: [jsx(HomeStyles, {}), jsx("header", {
|
|
413
|
+
className: "cbh-nav",
|
|
414
|
+
children: jsxs("div", {
|
|
415
|
+
className: "cbh-wrap cbh-nav-row",
|
|
416
|
+
children: [jsxs("a", {
|
|
417
|
+
className: "cbh-brand",
|
|
418
|
+
href: "#top",
|
|
419
|
+
"aria-label": "Clockbook home",
|
|
420
|
+
children: [jsx(Mark, {
|
|
421
|
+
size: 30
|
|
422
|
+
}), jsx("span", {
|
|
423
|
+
children: "Clockbook"
|
|
424
|
+
})]
|
|
425
|
+
}), jsxs("nav", {
|
|
426
|
+
className: "cbh-links",
|
|
427
|
+
"aria-label": "Sections",
|
|
428
|
+
children: [jsx("a", {
|
|
429
|
+
href: "#calls",
|
|
430
|
+
children: "Lucy calls"
|
|
431
|
+
}), jsx("a", {
|
|
432
|
+
href: "#areas",
|
|
433
|
+
children: "What it handles"
|
|
434
|
+
}), jsx("a", {
|
|
435
|
+
href: "#how",
|
|
436
|
+
children: "How it works"
|
|
437
|
+
}), jsxs("a", {
|
|
438
|
+
href: "#business",
|
|
439
|
+
className: "cbh-link-biz",
|
|
440
|
+
children: [jsx(Briefcase, {
|
|
441
|
+
size: 15,
|
|
442
|
+
"aria-hidden": true
|
|
443
|
+
}), " For business"]
|
|
444
|
+
})]
|
|
445
|
+
}), jsxs("div", {
|
|
446
|
+
className: "cbh-nav-cta",
|
|
447
|
+
children: [signedIn ? null : jsx("button", {
|
|
448
|
+
type: "button",
|
|
449
|
+
className: "cbh-signin",
|
|
450
|
+
onClick: () => setSignIn({
|
|
451
|
+
chore: ''
|
|
452
|
+
}),
|
|
453
|
+
children: "Sign in"
|
|
454
|
+
}), jsx("button", {
|
|
455
|
+
type: "button",
|
|
456
|
+
className: "cbh-btn cbh-btn-small",
|
|
457
|
+
onClick: tryIt,
|
|
458
|
+
children: signedIn ? 'Open chat' : 'Try it'
|
|
459
|
+
})]
|
|
460
|
+
})]
|
|
461
|
+
})
|
|
462
|
+
}), jsxs("main", {
|
|
463
|
+
children: [jsx("section", {
|
|
464
|
+
className: "cbh-hero",
|
|
465
|
+
id: "top",
|
|
466
|
+
children: jsxs("div", {
|
|
467
|
+
className: "cbh-wrap cbh-hero-grid",
|
|
468
|
+
children: [jsxs("div", {
|
|
469
|
+
className: "cbh-hero-copy",
|
|
470
|
+
children: [jsx("p", {
|
|
471
|
+
className: "cbh-eyebrow",
|
|
472
|
+
children: "For busy households"
|
|
473
|
+
}), jsxs("h1", {
|
|
474
|
+
children: ["Get your evenings ", jsx("em", {
|
|
475
|
+
children: "back."
|
|
476
|
+
})]
|
|
477
|
+
}), jsxs("p", {
|
|
478
|
+
className: "cbh-lead",
|
|
479
|
+
children: ["Clockbook takes the life admin off your plate: the calls, the bills, the cancellations, the groceries and the appointments. About 38 minutes back, every day.", jsx("sup", {
|
|
480
|
+
children: "1"
|
|
481
|
+
})]
|
|
482
|
+
}), jsx(Composer, {
|
|
483
|
+
id: "cbh-chore-hero",
|
|
484
|
+
onSubmit: handOver,
|
|
485
|
+
onWarm: warmChat,
|
|
486
|
+
inputRef: heroFieldRef
|
|
487
|
+
}), jsxs("div", {
|
|
488
|
+
className: "cbh-try",
|
|
489
|
+
children: [jsx("span", {
|
|
490
|
+
className: "cbh-try-label",
|
|
491
|
+
children: "Or try one"
|
|
492
|
+
}), jsx("div", {
|
|
493
|
+
className: "cbh-chips",
|
|
494
|
+
children: HERO_CHORES.map(c => jsx(ChoreChip, {
|
|
495
|
+
chore: c,
|
|
496
|
+
onChore: handOver
|
|
497
|
+
}, c.label))
|
|
498
|
+
})]
|
|
499
|
+
})]
|
|
500
|
+
}), jsx("div", {
|
|
501
|
+
className: "cbh-hero-media",
|
|
502
|
+
children: jsx(Loop, {
|
|
503
|
+
src: HOME_ASSETS.loopTimeBack,
|
|
504
|
+
poster: HOME_ASSETS.loopTimeBackPoster,
|
|
505
|
+
label: "The Clockbook clock rewinds: 38 minutes a day, 4.4 hours a week, 229 hours a year"
|
|
506
|
+
})
|
|
507
|
+
})]
|
|
508
|
+
})
|
|
509
|
+
}), jsx("section", {
|
|
510
|
+
className: "cbh-band",
|
|
511
|
+
"aria-label": "Time back",
|
|
512
|
+
children: jsxs("div", {
|
|
513
|
+
className: "cbh-wrap cbh-stats",
|
|
514
|
+
children: [jsxs("div", {
|
|
515
|
+
children: [jsx("b", {
|
|
516
|
+
children: "38 min"
|
|
517
|
+
}), jsx("span", {
|
|
518
|
+
children: "back, every day"
|
|
519
|
+
})]
|
|
520
|
+
}), jsxs("div", {
|
|
521
|
+
children: [jsx("b", {
|
|
522
|
+
children: "4.4 hrs"
|
|
523
|
+
}), jsx("span", {
|
|
524
|
+
children: "every week"
|
|
525
|
+
})]
|
|
526
|
+
}), jsxs("div", {
|
|
527
|
+
children: [jsx("b", {
|
|
528
|
+
children: "229 hrs"
|
|
529
|
+
}), jsx("span", {
|
|
530
|
+
children: "every year"
|
|
531
|
+
})]
|
|
532
|
+
})]
|
|
533
|
+
})
|
|
534
|
+
}), jsx("section", {
|
|
535
|
+
className: "cbh-section",
|
|
536
|
+
id: "calls",
|
|
537
|
+
children: jsxs("div", {
|
|
538
|
+
className: "cbh-wrap cbh-split",
|
|
539
|
+
children: [jsxs("div", {
|
|
540
|
+
children: [jsxs("p", {
|
|
541
|
+
className: "cbh-eyebrow",
|
|
542
|
+
children: [jsx(PhoneCall, {
|
|
543
|
+
size: 16,
|
|
544
|
+
"aria-hidden": true
|
|
545
|
+
}), " Lucy makes the call"]
|
|
546
|
+
}), jsx("h2", {
|
|
547
|
+
children: "Never sit on hold again."
|
|
548
|
+
}), jsx("p", {
|
|
549
|
+
className: "cbh-body",
|
|
550
|
+
children: "Text Lucy what you need. She calls, works the phone menu, waits through the hold music and talks to a real person. When they need to hear from you, she rings you in."
|
|
551
|
+
}), jsxs("ul", {
|
|
552
|
+
className: "cbh-ticks",
|
|
553
|
+
children: [jsx("li", {
|
|
554
|
+
children: "Works the phone menu"
|
|
555
|
+
}), jsx("li", {
|
|
556
|
+
children: "Waits on hold for you"
|
|
557
|
+
}), jsx("li", {
|
|
558
|
+
children: "Says no to the retention offers"
|
|
559
|
+
}), jsx("li", {
|
|
560
|
+
children: "Rings you in to confirm"
|
|
561
|
+
})]
|
|
562
|
+
}), jsx("p", {
|
|
563
|
+
className: "cbh-note",
|
|
564
|
+
children: VIDEO_NOTE
|
|
565
|
+
})]
|
|
566
|
+
}), jsx("div", {
|
|
567
|
+
className: "cbh-reels",
|
|
568
|
+
children: REELS.map(r => jsx(Reel, {
|
|
569
|
+
...r
|
|
570
|
+
}, r.title))
|
|
571
|
+
})]
|
|
572
|
+
})
|
|
573
|
+
}), jsx("section", {
|
|
574
|
+
className: "cbh-section cbh-soft",
|
|
575
|
+
id: "minutes",
|
|
576
|
+
children: jsxs("div", {
|
|
577
|
+
className: "cbh-wrap cbh-split cbh-split-media-first",
|
|
578
|
+
children: [jsx("div", {
|
|
579
|
+
className: "cbh-media-card",
|
|
580
|
+
children: jsx(Loop, {
|
|
581
|
+
src: HOME_ASSETS.loopWhere,
|
|
582
|
+
poster: HOME_ASSETS.loopWherePoster,
|
|
583
|
+
label: "The clock face fills slice by slice: shopping, meals, bills, calls and family logistics"
|
|
584
|
+
})
|
|
585
|
+
}), jsxs("div", {
|
|
586
|
+
children: [jsx("p", {
|
|
587
|
+
className: "cbh-eyebrow",
|
|
588
|
+
children: "Where it comes from"
|
|
589
|
+
}), jsxs("h2", {
|
|
590
|
+
children: [jsxs("span", {
|
|
591
|
+
className: "cbh-nowrap",
|
|
592
|
+
children: [totalMin, " minutes,"]
|
|
593
|
+
}), " chore by chore."]
|
|
594
|
+
}), jsxs("ul", {
|
|
595
|
+
className: "cbh-minutes",
|
|
596
|
+
children: [MINUTES.map(m => jsxs("li", {
|
|
597
|
+
children: [jsx("span", {
|
|
598
|
+
className: "cbh-sw",
|
|
599
|
+
style: {
|
|
600
|
+
background: m.color
|
|
601
|
+
},
|
|
602
|
+
"aria-hidden": true
|
|
603
|
+
}), jsx("span", {
|
|
604
|
+
className: "cbh-minutes-label",
|
|
605
|
+
children: m.label
|
|
606
|
+
}), jsx("span", {
|
|
607
|
+
className: "cbh-minutes-bar",
|
|
608
|
+
"aria-hidden": true,
|
|
609
|
+
children: jsx("i", {
|
|
610
|
+
style: {
|
|
611
|
+
width: `${m.min / 17 * 100}%`
|
|
612
|
+
}
|
|
613
|
+
})
|
|
614
|
+
}), jsxs("b", {
|
|
615
|
+
children: [m.min, " min"]
|
|
616
|
+
})]
|
|
617
|
+
}, m.label)), jsxs("li", {
|
|
618
|
+
className: "cbh-minutes-none",
|
|
619
|
+
children: [jsx("span", {
|
|
620
|
+
className: "cbh-sw",
|
|
621
|
+
"aria-hidden": true
|
|
622
|
+
}), jsx("span", {
|
|
623
|
+
className: "cbh-minutes-label",
|
|
624
|
+
children: "Housework"
|
|
625
|
+
}), jsx("span", {
|
|
626
|
+
className: "cbh-minutes-bar",
|
|
627
|
+
"aria-hidden": true
|
|
628
|
+
}), jsx("b", {
|
|
629
|
+
children: "0 min"
|
|
630
|
+
})]
|
|
631
|
+
})]
|
|
632
|
+
}), jsxs("p", {
|
|
633
|
+
className: "cbh-body cbh-small",
|
|
634
|
+
children: ["Clockbook can't fold the laundry. The ", HOUSEWORK_MIN, " minutes a day of cleaning and washing stay yours; the rest you can hand over.", jsx("sup", {
|
|
635
|
+
children: "1"
|
|
636
|
+
})]
|
|
637
|
+
})]
|
|
638
|
+
})]
|
|
639
|
+
})
|
|
640
|
+
}), jsx("section", {
|
|
641
|
+
className: "cbh-section",
|
|
642
|
+
id: "areas",
|
|
643
|
+
children: jsxs("div", {
|
|
644
|
+
className: "cbh-wrap",
|
|
645
|
+
children: [jsx("p", {
|
|
646
|
+
className: "cbh-eyebrow",
|
|
647
|
+
children: "What it handles"
|
|
648
|
+
}), jsx("h2", {
|
|
649
|
+
children: "Hand over every corner of home life."
|
|
650
|
+
}), jsx("div", {
|
|
651
|
+
className: "cbh-areas",
|
|
652
|
+
children: AREAS.map(a => {
|
|
653
|
+
const Icon = AREA_ICONS[a.key];
|
|
654
|
+
return jsxs("article", {
|
|
655
|
+
className: "cbh-area",
|
|
656
|
+
children: [jsx("span", {
|
|
657
|
+
className: "cbh-area-icon",
|
|
658
|
+
"aria-hidden": true,
|
|
659
|
+
children: jsx(Icon, {
|
|
660
|
+
size: 22
|
|
661
|
+
})
|
|
662
|
+
}), jsx("h3", {
|
|
663
|
+
children: a.title
|
|
664
|
+
}), jsx("p", {
|
|
665
|
+
children: a.blurb
|
|
666
|
+
}), jsx("div", {
|
|
667
|
+
className: "cbh-chips cbh-chips-small",
|
|
668
|
+
children: a.chores.map(c => jsx(ChoreChip, {
|
|
669
|
+
chore: c,
|
|
670
|
+
onChore: handOver
|
|
671
|
+
}, c.label))
|
|
672
|
+
})]
|
|
673
|
+
}, a.key);
|
|
674
|
+
})
|
|
675
|
+
})]
|
|
676
|
+
})
|
|
677
|
+
}), jsx("section", {
|
|
678
|
+
className: "cbh-section cbh-soft",
|
|
679
|
+
id: "how",
|
|
680
|
+
children: jsxs("div", {
|
|
681
|
+
className: "cbh-wrap",
|
|
682
|
+
children: [jsx("p", {
|
|
683
|
+
className: "cbh-eyebrow",
|
|
684
|
+
children: "How it works"
|
|
685
|
+
}), jsx("h2", {
|
|
686
|
+
children: "Text it. It gets done."
|
|
687
|
+
}), jsx("ol", {
|
|
688
|
+
className: "cbh-steps",
|
|
689
|
+
children: STEPS.map((s, i) => jsxs("li", {
|
|
690
|
+
children: [jsx("span", {
|
|
691
|
+
className: "cbh-step-n",
|
|
692
|
+
children: i + 1
|
|
693
|
+
}), jsx("h3", {
|
|
694
|
+
children: s.title
|
|
695
|
+
}), jsx("p", {
|
|
696
|
+
children: s.body
|
|
697
|
+
})]
|
|
698
|
+
}, s.title))
|
|
699
|
+
})]
|
|
700
|
+
})
|
|
701
|
+
}), jsx("section", {
|
|
702
|
+
className: "cbh-section",
|
|
703
|
+
id: "day",
|
|
704
|
+
children: jsxs("div", {
|
|
705
|
+
className: "cbh-wrap cbh-split",
|
|
706
|
+
children: [jsxs("div", {
|
|
707
|
+
children: [jsx("p", {
|
|
708
|
+
className: "cbh-eyebrow",
|
|
709
|
+
children: "A working day"
|
|
710
|
+
}), jsx("h2", {
|
|
711
|
+
children: "After work, sleep and chores, the evening is short."
|
|
712
|
+
}), jsxs("p", {
|
|
713
|
+
className: "cbh-body",
|
|
714
|
+
children: ["A working adult spends about 2.8 hours a day on life admin. Clockbook gives you 38 minutes of it back, every day. That is about 229 hours a year, or 28 workdays.", jsx("sup", {
|
|
715
|
+
children: "1"
|
|
716
|
+
})]
|
|
717
|
+
})]
|
|
718
|
+
}), jsx("div", {
|
|
719
|
+
className: "cbh-media-card",
|
|
720
|
+
children: jsx(Loop, {
|
|
721
|
+
src: HOME_ASSETS.loopDay,
|
|
722
|
+
poster: HOME_ASSETS.loopDayPoster,
|
|
723
|
+
label: "A working day as bars: the Clockbook clock takes 38 minutes off life admin"
|
|
724
|
+
})
|
|
725
|
+
})]
|
|
726
|
+
})
|
|
727
|
+
}), jsx("section", {
|
|
728
|
+
className: "cbh-section cbh-business",
|
|
729
|
+
id: "business",
|
|
730
|
+
children: jsxs("div", {
|
|
731
|
+
className: "cbh-wrap",
|
|
732
|
+
children: [jsxs("div", {
|
|
733
|
+
className: "cbh-business-head",
|
|
734
|
+
children: [jsxs("div", {
|
|
735
|
+
children: [jsxs("p", {
|
|
736
|
+
className: "cbh-eyebrow",
|
|
737
|
+
children: [jsx(Briefcase, {
|
|
738
|
+
size: 16,
|
|
739
|
+
"aria-hidden": true
|
|
740
|
+
}), " Clockbook for business"]
|
|
741
|
+
}), jsx("h2", {
|
|
742
|
+
children: "The same Clockbook runs the back office."
|
|
743
|
+
}), jsx("p", {
|
|
744
|
+
className: "cbh-body",
|
|
745
|
+
children: "Clockbook started as the time tracker teams run their day on. For a business it is the whole back office: time, people, money and the workflows between them, with the paperwork handled and you always in control."
|
|
746
|
+
})]
|
|
747
|
+
}), jsxs("div", {
|
|
748
|
+
className: "cbh-business-ctas",
|
|
749
|
+
children: [jsxs("a", {
|
|
750
|
+
className: "cbh-btn",
|
|
751
|
+
href: businessHref(BUSINESS_LINKS.home),
|
|
752
|
+
children: ["See Clockbook for business", jsx(ArrowRight, {
|
|
753
|
+
size: 18,
|
|
754
|
+
"aria-hidden": true
|
|
755
|
+
})]
|
|
756
|
+
}), jsxs("div", {
|
|
757
|
+
className: "cbh-business-links",
|
|
758
|
+
children: [jsx("a", {
|
|
759
|
+
href: businessHref(BUSINESS_LINKS.pricing),
|
|
760
|
+
children: "Pricing"
|
|
761
|
+
}), jsx("a", {
|
|
762
|
+
href: businessHref(BUSINESS_LINKS.demo),
|
|
763
|
+
children: "Book a demo"
|
|
764
|
+
}), jsx("a", {
|
|
765
|
+
href: businessHref(BUSINESS_LINKS.freelancers),
|
|
766
|
+
children: "For freelancers"
|
|
767
|
+
})]
|
|
768
|
+
})]
|
|
769
|
+
})]
|
|
770
|
+
}), jsx("div", {
|
|
771
|
+
className: "cbh-business-grid",
|
|
772
|
+
children: BUSINESS_PRODUCTS.map(p => {
|
|
773
|
+
const Icon = BUSINESS_ICONS[p.key];
|
|
774
|
+
return jsxs("a", {
|
|
775
|
+
className: "cbh-business-card",
|
|
776
|
+
href: businessHref(p.path),
|
|
777
|
+
children: [jsx("span", {
|
|
778
|
+
className: "cbh-area-icon",
|
|
779
|
+
"aria-hidden": true,
|
|
780
|
+
children: jsx(Icon, {
|
|
781
|
+
size: 22
|
|
782
|
+
})
|
|
783
|
+
}), jsx("h3", {
|
|
784
|
+
children: p.title
|
|
785
|
+
}), jsx("p", {
|
|
786
|
+
children: p.blurb
|
|
787
|
+
}), jsxs("span", {
|
|
788
|
+
className: "cbh-business-more",
|
|
789
|
+
children: ["Learn more ", jsx(ArrowRight, {
|
|
790
|
+
size: 16,
|
|
791
|
+
"aria-hidden": true
|
|
792
|
+
})]
|
|
793
|
+
})]
|
|
794
|
+
}, p.key);
|
|
795
|
+
})
|
|
796
|
+
})]
|
|
797
|
+
})
|
|
798
|
+
}), jsx("section", {
|
|
799
|
+
className: "cbh-final",
|
|
800
|
+
children: jsxs("div", {
|
|
801
|
+
className: "cbh-wrap",
|
|
802
|
+
children: [jsx(AnimatedMark, {
|
|
803
|
+
className: "cbh-final-mark"
|
|
804
|
+
}), jsx("h2", {
|
|
805
|
+
children: "What's the first chore you'd hand over?"
|
|
806
|
+
}), jsx(Composer, {
|
|
807
|
+
id: "cbh-chore-final",
|
|
808
|
+
large: true,
|
|
809
|
+
onSubmit: handOver,
|
|
810
|
+
onWarm: warmChat
|
|
811
|
+
}), jsx("p", {
|
|
812
|
+
className: "cbh-note",
|
|
813
|
+
children: "Lucy asks before she pays for anything or changes an account."
|
|
814
|
+
})]
|
|
815
|
+
})
|
|
816
|
+
})]
|
|
817
|
+
}), jsx("footer", {
|
|
818
|
+
className: "cbh-footer",
|
|
819
|
+
children: jsxs("div", {
|
|
820
|
+
className: "cbh-wrap",
|
|
821
|
+
children: [jsxs("div", {
|
|
822
|
+
className: "cbh-footer-row",
|
|
823
|
+
children: [jsxs("div", {
|
|
824
|
+
className: "cbh-footer-brand",
|
|
825
|
+
children: [jsx(Mark, {
|
|
826
|
+
size: 26
|
|
827
|
+
}), jsx("span", {
|
|
828
|
+
children: "Clockbook"
|
|
829
|
+
}), jsx("em", {
|
|
830
|
+
children: "Time back, every day."
|
|
831
|
+
})]
|
|
832
|
+
}), jsxs("nav", {
|
|
833
|
+
className: "cbh-footer-links",
|
|
834
|
+
"aria-label": "Clockbook for business",
|
|
835
|
+
children: [jsxs("a", {
|
|
836
|
+
href: businessHref(BUSINESS_LINKS.home),
|
|
837
|
+
children: [jsx(Briefcase, {
|
|
838
|
+
size: 15,
|
|
839
|
+
"aria-hidden": true
|
|
840
|
+
}), " Clockbook for business"]
|
|
841
|
+
}), jsx("a", {
|
|
842
|
+
href: businessHref(BUSINESS_LINKS.pricing),
|
|
843
|
+
children: "Pricing"
|
|
844
|
+
}), jsx("a", {
|
|
845
|
+
href: businessHref(BUSINESS_LINKS.helpCenter),
|
|
846
|
+
children: "Help center"
|
|
847
|
+
})]
|
|
848
|
+
})]
|
|
849
|
+
}), jsxs("p", {
|
|
850
|
+
className: "cbh-footnote",
|
|
851
|
+
children: [jsx("sup", {
|
|
852
|
+
children: "1"
|
|
853
|
+
}), " ", FOOTNOTE, " ", VIDEO_NOTE]
|
|
854
|
+
})]
|
|
855
|
+
})
|
|
856
|
+
}), signIn ? jsx(SignInDialog, {
|
|
857
|
+
chore: signIn.chore,
|
|
858
|
+
expired: signIn.expired,
|
|
859
|
+
onContinue: continueSignIn,
|
|
860
|
+
onCancel: () => setSignIn(null)
|
|
861
|
+
}) : null, chat.mounted ? createPortal(jsx(Suspense, {
|
|
862
|
+
fallback: chat.open ? jsx("div", {
|
|
863
|
+
className: "cbh-chat-loading",
|
|
864
|
+
role: "status",
|
|
865
|
+
"aria-label": "Opening the chat"
|
|
866
|
+
}) : null,
|
|
867
|
+
children: jsx(ChoresChat, {
|
|
868
|
+
request: chat.request,
|
|
869
|
+
hidden: !chat.open,
|
|
870
|
+
onClose: closeChat,
|
|
871
|
+
onSignedOut: onSignedOut,
|
|
872
|
+
onSessionExpired: onSessionExpired
|
|
873
|
+
})
|
|
874
|
+
}), document.body) : null]
|
|
875
|
+
});
|
|
876
|
+
}export{HomePage as default};//# sourceMappingURL=HomePage.js.map
|