Skip to content

I add loops ai.#46

Merged
techeng322 merged 12 commits into
mainfrom
tech322/save-email
Oct 30, 2024
Merged

I add loops ai.#46
techeng322 merged 12 commits into
mainfrom
tech322/save-email

Conversation

@techeng322

Copy link
Copy Markdown
Contributor

No description provided.

@vercel

vercel Bot commented Oct 30, 2024

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
luh-tyler-chat ✅ Ready (Inspect) Visit Preview Oct 30, 2024 7:22pm

Comment thread app/api/email/route.tsx
Comment thread app/api/email/route.tsx
Comment thread app/api/email/route.tsx
Comment thread hooks/useUser.tsx Outdated
const headers = {
"Content-Type": "application/json", // Specify the content type
};
fetch("/api/email", {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fetch call for /api/email does not handle the response, which could lead to silent errors. Also, having two fetch calls (to /api/email and /api/account) can be optimized if needed.

Comment thread hooks/useUser.tsx
Comment thread app/api/email/route.tsx Outdated
const email = body.email;

try {
const resp = await loopsClient.createContact(email);

@ZainTest0821 ZainTest0821 Oct 30, 2024

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure the loopsClient function createContact handles authentication using environment variables for security.
This example assumes the API call to loops.so through the loopsClient setup is authenticated and is in line with your broader security standards.

Comment thread hooks/useTrackEmail.tsx Outdated
import { useSearchParams } from "next/navigation";
import { useEffect, useState } from "react";

const useTrackeEmail = () => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const useTrackeEmail = () => {
const useTrackEmail = () => {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants