Skip to content

Commit

Permalink
preview user data on profile page
Browse files Browse the repository at this point in the history
  • Loading branch information
Djibril-Mugisho committed Aug 23, 2022
1 parent b632710 commit 5298054
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ NEXT_PUBLIC_WEB3_NODE_RPC=https://matic-mumbai.chainstacklabs.com
NEXT_PUBLIC_IPFS_AUTH=7100c075ab2d434bb74187580c4bb49b
NEXT_PUBLIC_WEB3_STORAGE_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweDM1MzdCN0VkNGI1NGEzZTVjMjRiODUyOTA0ODM4OWI5ZDkxNWZBRWMiLCJpc3MiOiJ3ZWIzLXN0b3JhZ2UiLCJpYXQiOjE2NjExNjA0MzkyODMsIm5hbWUiOiJvbmdhbWFfc3RvcmFnZV90b2tlbiJ9.pt1xVsrxcpDrght2zSHreMqQE_3XDsVYioZpGXjLsxM
NEXT_PUBLIC_STORAGE_FEE_RECEIVER_ADRESS=0x34bA628174007b82f5CF3449b435bB871518cD75
NEXT_PUBLIC_STORAGE_FEE=0.0001
NEXT_PUBLIC_STORAGE_FEE=0.0001
10 changes: 6 additions & 4 deletions components/EditProfilePage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ import { orderObject } from "@lib/Utils";
import UploadFileProcessing from "@components/modules/__modules__/Card/UploadFileProcessing";
import UploadFileErrorCard from "@components/modules/__modules__/Card/UploadFileErrorCard";
import { currentAccountState } from "@lib/atoms";
import { useRecoilState } from "recoil";
import { useRecoilState, useRecoilValue } from "recoil";
import { saveFileWithWeb3Storage } from "@lib/web3StorageClient";
import { useRecoilValue } from "recoil";

const EditProfile = () => {
const userAccount = useRecoilValue(currentAccountState);
const [img, setImg] = useState<File | null>(null);
const [previewImgLink, setPreviewImgLink] = useState(userAccount?.avatarUrl);
console.log(userAccount, "user account");

const [profile, setProfile] = useState({
walletAddress: "",
username: "",
Expand Down Expand Up @@ -165,8 +166,9 @@ const EditProfile = () => {
onChange={(e) =>
setProfile({ ...profile, username: e.target.value })
}
// value={currentUserInformations[0]?.username}
defaultValue={userAccount?.username}
/>

<label
htmlFor="bio"
className="dark:text-white font-semibold pt-4 pb-2"
Expand All @@ -180,7 +182,7 @@ const EditProfile = () => {
onChange={(e) =>
setProfile({ ...profile, userBio: e.target.value })
}
// value={currentUserInformations[0]?.userBio}
defaultValue={userAccount?.userBio}
/>
<label
htmlFor="portfolio"
Expand Down
46 changes: 31 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5298054

Please sign in to comment.