Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debug logging of Hubspot ID #2324

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions packages/www/components/Register/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ const Register = ({ id, buttonText, onSubmit, loading, errors }) => {
formId: process.env.NEXT_PUBLIC_HUBSPOT_REGISTER_FORM_ID,
});

console.log(
">>>>>>> portalID: " +
process.env.NEXT_PUBLIC_HUBSPOT_PORTAL_ID +
" Form ID: " +
process.env.NEXT_PUBLIC_HUBSPOT_REGISTER_FORM_ID,
);

const { subscribe } = useMailChimp({
action: `https://livepeer.us16.list-manage.com/subscribe/post?u=57807e9b74db375864b2c4c68&id=ecd3bf60d5&f_id=00ae69e0f0&tags=3536469`,
});
Expand Down Expand Up @@ -68,9 +75,7 @@ const Register = ({ id, buttonText, onSubmit, loading, errors }) => {
});

// only handle submission to hubspot on prod
if (process.env.NEXT_PUBLIC_SITE_URL === "livepeer.studio") {
handleSubmit(e);
}
handleSubmit(e);

const [hashedPassword] = await hash(password, FRONTEND_SALT);
// hash password, then
Expand Down
8 changes: 8 additions & 0 deletions packages/www/hooks/use-hubspot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ const useHubspotForm = ({ portalId, formId }) => {
[portalId, formId],
);

console.log("useMemo URL: " + url);

const fetchData = async () => {
console.log("fetchData");
setIsError(false);
setIsLoading(true);
try {
Expand All @@ -34,9 +37,14 @@ const useHubspotForm = ({ portalId, formId }) => {
},
});
const body = await result.json();
console.log("body");
console.log(body);
console.log(result);
setData(body);
setForm(false);
} catch (e) {
console.log("error");
console.log(e);
setIsError(true);
setForm(false);
}
Expand Down
Loading