Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
Udit-takkar committed May 9, 2024
1 parent 8d2838d commit 695cc34
Show file tree
Hide file tree
Showing 2 changed files with 7,423 additions and 5,879 deletions.
14 changes: 13 additions & 1 deletion components/ProfileCreationForm/ProfileCreationForm.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
"use client";


// TODO:
// 1) Only upload image to IPFS
// 2) Call to supabase (add trpc?)
// 3) Use react hook form
// Fix color schemes
// Add connect to wallet while creating profile and get address
//

import React, { useState } from "react";


import SubmitLinksSection, { TLink } from "./SubmitLinksSection";
import UserMetaDetailsSection, {
TUserMetaDetails,
Expand Down Expand Up @@ -30,6 +40,7 @@ const ProfileCreationForm = () => {

const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();

const body = {
userName: userMetaDetails.username,
bio: userMetaDetails.bio,
Expand All @@ -42,7 +53,8 @@ const ProfileCreationForm = () => {
})),
};
const cid = await uploadFileToWeb3Storage<typeof body>({ payload: body });
console.log("cid:", cid);
const ipfsUrl = `ipfs://${cid}`;
console.log("ipfsUrl:", ipfsUrl);
};

return (
Expand Down
Loading

0 comments on commit 695cc34

Please sign in to comment.