Skip to content

Vercel build failing (noob building first real app please have mercy 🙏) #7388

Locked Answered by versecafe
reixyz22 asked this question in Help
Discussion options

You must be logged in to vote

@reixyz22

const EditPage: React.FC<ContactPageProps> = ({ emailProp, editProp }) => {
    const params = useParams();
    const email = emailProp || decodeURIComponent(params.email as string);
    const dispatch = useDispatch();

    // State to manage the form inputs
    const [newName, setNewName] = useState<string>('');
    const [newEmail, setNewEmail] = useState<string>('');
    const [newPhone, setNewPhone] = useState<string>('');

    const handleSave = async () => {

        let updateUrl = `/api/contacts/${email}/edit`; //edit contact API

        if (email === "new"){ //add new contact API
                updateUrl = `/api/contacts/add`;
        }
        const dataToSend = {

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@reixyz22
Comment options

@versecafe
Comment options

Answer selected by reixyz22
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants