Refactoring collection creation logic (#20)

* Split collection info component

* Fix texts

* Refactor components

* Create upload details component

* Add on change method to collection details

* Add on change method to minting details

* Add on change method to whitelist details

* Add on change method to royalty details

* Update create page name

* Refactor code for collection creation logic
This commit is contained in:
Arda Nakışçı
2022-08-04 12:16:42 +03:00
committed by GitHub
parent 725439275d
commit 4ba58eca6d
9 changed files with 1145 additions and 814 deletions
+1 -2
View File
@@ -4,7 +4,7 @@
import axios from 'axios'
import { PINATA_ENDPOINT_URL } from 'utils/constants'
export type UploadFileType = 'assets' | 'metadata'
export type UploadFileType = 'assets' | 'metadata' | 'cover'
export const uploadToPinata = async (
fileArray: File[],
@@ -12,7 +12,6 @@ export const uploadToPinata = async (
pinataSecretKey: string,
fileType: UploadFileType,
): Promise<string> => {
console.log('Uploading to Pinata...')
const data = new FormData()
fileArray.forEach((file) => {
data.append('file', file, `${fileType}/${file.name}`)