2023-10-11 23:36:14 +00:00
|
|
|
import { create } from 'zustand'
|
2022-07-14 10:16:50 +00:00
|
|
|
|
|
|
|
export const useCollectionStore = create(() => ({
|
|
|
|
name: 'Example',
|
2022-07-28 13:38:43 +00:00
|
|
|
base_token_uri: '',
|
2022-07-14 10:16:50 +00:00
|
|
|
description: 'Lorem',
|
2022-07-27 06:49:36 +00:00
|
|
|
image: 'ipfs://bafybeigi3bwpvyvsmnbj46ra4hyffcxdeaj6ntfk5jpic5mx27x6ih2qvq/images/1.png',
|
|
|
|
external_image: '',
|
2022-07-14 10:16:50 +00:00
|
|
|
num_tokens: 10,
|
|
|
|
per_address_limit: 1,
|
|
|
|
start_time: '1650982532000000000',
|
|
|
|
symbol: 'EXP',
|
|
|
|
unit_price: 50,
|
|
|
|
whitelist: '',
|
|
|
|
}))
|
|
|
|
|
|
|
|
export const setName = (value: string) => {
|
|
|
|
useCollectionStore.setState({ name: value })
|
|
|
|
}
|
|
|
|
|
|
|
|
export const setBaseTokenUri = (value: string) => {
|
|
|
|
useCollectionStore.setState({ base_token_uri: value })
|
|
|
|
}
|
|
|
|
|
|
|
|
export const setDescription = (value: string) => {
|
|
|
|
useCollectionStore.setState({ description: value })
|
|
|
|
}
|
|
|
|
|
|
|
|
export const setImage = (value: string) => {
|
|
|
|
useCollectionStore.setState({ image: value })
|
|
|
|
}
|
|
|
|
|
2022-07-27 06:49:36 +00:00
|
|
|
export const setExternalImage = (value: string) => {
|
|
|
|
useCollectionStore.setState({ external_image: value })
|
|
|
|
}
|
|
|
|
|
2022-07-14 10:16:50 +00:00
|
|
|
export const setNumTokens = (value: number) => {
|
|
|
|
useCollectionStore.setState({ num_tokens: value })
|
|
|
|
}
|
|
|
|
|
|
|
|
export const setPerAddressLimit = (value: number) => {
|
|
|
|
useCollectionStore.setState({ per_address_limit: value })
|
|
|
|
}
|
|
|
|
|
|
|
|
export const setStartTime = (value: string) => {
|
|
|
|
useCollectionStore.setState({ start_time: value })
|
|
|
|
}
|
|
|
|
|
|
|
|
export const setSymbol = (value: string) => {
|
|
|
|
useCollectionStore.setState({ symbol: value })
|
|
|
|
}
|
|
|
|
|
|
|
|
export const setUnitPrice = (value: number) => {
|
|
|
|
useCollectionStore.setState({ unit_price: value })
|
|
|
|
}
|
|
|
|
|
|
|
|
export const setWhitelist = (value: string) => {
|
|
|
|
useCollectionStore.setState({ whitelist: value })
|
|
|
|
}
|