diff --git a/src/components/LBP/InvestmentList/LbpCard.tsx b/src/components/LBP/InvestmentList/LbpCard.tsx
index 22a88ced99..6a27de9d03 100644
--- a/src/components/LBP/InvestmentList/LbpCard.tsx
+++ b/src/components/LBP/InvestmentList/LbpCard.tsx
@@ -38,7 +38,6 @@ export const LbpCard: React.FC = ({ lbp }) => {
[lbp?.status]
)
-
const onClick = React.useCallback(() => {
if (!account || isChangeRequested || isPending || isDraft || isRejected || isNotSubmitted) {
toggleKYCModal()
@@ -107,7 +106,7 @@ export const LbpCard: React.FC = ({ lbp }) => {
{isClosed && (
- Learn More
+ {LbpStatus.closed === lbp.status ? 'Claim Now' : 'Learn More'}
)}
diff --git a/src/components/LBP/PublicDetails/PublicChart.tsx b/src/components/LBP/PublicDetails/PublicChart.tsx
index e590c9a223..a78be616b0 100644
--- a/src/components/LBP/PublicDetails/PublicChart.tsx
+++ b/src/components/LBP/PublicDetails/PublicChart.tsx
@@ -1,5 +1,5 @@
import { useCallback, useMemo } from 'react'
-import { LineChart, Line, XAxis, YAxis, Tooltip, DefaultTooltipContent } from 'recharts'
+import { LineChart, AreaChart, Line, XAxis, YAxis, Tooltip, DefaultTooltipContent, Area } from 'recharts'
import styled from 'styled-components'
import { useWeb3React } from '@web3-react/core'
import { useSubgraphQuery } from 'hooks/useSubgraphQuery'
@@ -220,12 +220,18 @@ export default function DetailsChart({
return (
-
+
+
+
+
+
+
@@ -235,34 +241,19 @@ export default function DetailsChart({
} labelFormatter={() => ''} /> {/* Disable default label */}
-
+ {/* */}
`$${value}`} axisLine={false} />
- {/* */}
- {/* */}
- {/* */}
- {/* Historical Price */}
- {/* */}
- {/* */}
- {/* } */}
- {/* /> */}
- {/* */}
- {/* */}
- {/* */}
- {/* Future Price */}
- {/* */}
- {/* */}
- {/* } */}
- {/* /> */}
-
+
+
diff --git a/src/pages/LBP/components/Graph.tsx b/src/pages/LBP/components/Graph.tsx
index 87454a5025..84fd1c54b2 100644
--- a/src/pages/LBP/components/Graph.tsx
+++ b/src/pages/LBP/components/Graph.tsx
@@ -1,7 +1,7 @@
import React, { useCallback, useMemo } from 'react'
import styled from 'styled-components'
import { Card } from 'rebass'
-import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, Area } from 'recharts'
+import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, Area, AreaChart } from 'recharts'
import { NewLine } from 'components/Line'
import { ReactComponent as DurationIcon } from '../../../assets/images/group3.svg'
import { ReactComponent as MarketCapIcon } from '../../../assets/images/group1.svg'
@@ -142,18 +142,20 @@ export default function Graph({ graphData, step, setEndPrice, setStartPrice }: G
Price Discovery Preview
-
+
-
+
+
+
+
+
+
+
+
-
-
+
+
{contentData.map(({ icon: Icon, title, description }, index) => (
diff --git a/src/pages/LBP/components/ProjectInfo/AddSocialLinksModal.tsx b/src/pages/LBP/components/ProjectInfo/AddSocialLinksModal.tsx
index 7ce4ff806d..3e9973425c 100644
--- a/src/pages/LBP/components/ProjectInfo/AddSocialLinksModal.tsx
+++ b/src/pages/LBP/components/ProjectInfo/AddSocialLinksModal.tsx
@@ -62,9 +62,16 @@ const AddSocialLinksModal: React.FC = ({
if (!selected || !url) {
return
}
+
+ if (!isValidUrl(url)) {
+ setErrorUrl('Please enter valid URL')
+ return
+ }
handleAddLink()
onClose()
}
+
+
return (
@@ -98,7 +105,9 @@ const AddSocialLinksModal: React.FC = ({
diff --git a/src/pages/LBP/components/ProjectInfo/AdditionalLinksModal.tsx b/src/pages/LBP/components/ProjectInfo/AdditionalLinksModal.tsx
index 702bc5b6a4..21a5ff4064 100644
--- a/src/pages/LBP/components/ProjectInfo/AdditionalLinksModal.tsx
+++ b/src/pages/LBP/components/ProjectInfo/AdditionalLinksModal.tsx
@@ -61,6 +61,12 @@ const AdditionalLinksModal: React.FC = ({
if (!name || !url) {
return
}
+
+ if (!isValidUrl(url)) {
+ setErrorUrl('Please enter valid URL')
+ return
+ }
+
handleAddLink()
onClose()
}
diff --git a/src/pages/LBP/components/ProjectInfo/index.tsx b/src/pages/LBP/components/ProjectInfo/index.tsx
index 31cfd3d00f..5e14861c76 100644
--- a/src/pages/LBP/components/ProjectInfo/index.tsx
+++ b/src/pages/LBP/components/ProjectInfo/index.tsx
@@ -231,6 +231,8 @@ export default function ProjectInfo({ onChange, formData, setDirty }: ProjectInf
if (files.some((file: any) => file.size > MAX_FILE_UPLOAD_SIZE)) {
setIsErrorUploadDocs(true)
return
+ } else {
+ setIsErrorUploadDocs(false)
}
const filteredFiles = files.filter((file: any) => file.size <= MAX_FILE_UPLOAD_SIZE)
diff --git a/src/pages/LBP/components/Tokenomics.tsx b/src/pages/LBP/components/Tokenomics.tsx
index 9b0fd13b9a..748d665c14 100644
--- a/src/pages/LBP/components/Tokenomics.tsx
+++ b/src/pages/LBP/components/Tokenomics.tsx
@@ -123,8 +123,6 @@ const Tokenomics = ({
const [isOpen, setIsOpen] = useState(false)
const [startDateError, setStartDateError] = useState('')
const [endDateError, setEndDateError] = useState('')
- const [startDate, setStartDate] = useState(dayjs())
- const [endDate, setEndDate] = useState(dayjs())
const { chainId, account } = useWeb3React()
const [selectedToken, setSelectedToken] = useState({
tokenSymbol: 'USDC',
@@ -136,22 +134,6 @@ const Tokenomics = ({
shareBalance: '',
})
- const [formData, setFormData] = useState({
- shareAddress: formDataTokenomics.shareAddress,
- xTokenLiteProxyAddress: formDataTokenomics.xTokenLiteProxyAddress,
- assetTokenAddress: formDataTokenomics.assetTokenAddress,
- assetTokenSymbol: formDataTokenomics.assetTokenSymbol,
- shareInput: formDataTokenomics.shareInput,
- assetInput: formDataTokenomics.assetInput,
- maxSupply: formDataTokenomics.maxSupply,
- maxPrice: formDataTokenomics.maxPrice,
- startWeight: formDataTokenomics.startWeight,
- endWeight: formDataTokenomics.endWeight,
- startDate: formDataTokenomics.startDate,
- endDate: formDataTokenomics.endDate,
- contractAddress: formDataTokenomics.contractAddress,
- })
-
const formik = useFormik({
initialValues: {
shareAddress: '',
@@ -215,7 +197,6 @@ const Tokenomics = ({
assetTokenAddress: defaultTokenOption.tokenAddress,
assetTokenSymbol: defaultTokenOption.tokenSymbol,
}
- setFormData(updatedFormData)
onChange(updatedFormData)
}
}
@@ -262,7 +243,6 @@ const Tokenomics = ({
startWeight: newStartValue,
endWeight: newEndValue,
}
- setFormData(updatedFormData)
onChange(updatedFormData)
}
@@ -276,7 +256,6 @@ const Tokenomics = ({
startWeight: newStartValue,
endWeight: newEndValue,
}
- setFormData(updatedFormData)
onChange(updatedFormData)
}
const handleStartDateChange = (date: Dayjs | null) => {
@@ -286,14 +265,12 @@ const Tokenomics = ({
setStartDateError("Start date can't be in the past")
} else {
setStartDateError('')
- setStartDate(date)
}
const newStartDate = date.local().format('YYYY-MM-DD HH:mm:ss')
const updatedFormData = {
...formDataTokenomics,
startDate: newStartDate,
}
- setFormData(updatedFormData)
onChange(updatedFormData)
}
}
@@ -309,14 +286,12 @@ const Tokenomics = ({
setEndDateError('End date should be at least 1 day bigger than Start Date')
} else {
setEndDateError('')
- setEndDate(date)
}
const newEndDate = date.local().format('YYYY-MM-DD HH:mm:ss')
const updatedFormData = {
...formDataTokenomics,
endDate: newEndDate,
}
- setFormData(updatedFormData)
onChange(updatedFormData)
}
}
@@ -324,10 +299,6 @@ const Tokenomics = ({
const handleInputChange = (event: React.ChangeEvent) => {
formik.handleChange(event)
const { name, value } = event.target
- setFormData((prevFormData) => ({
- ...prevFormData,
- [name]: value,
- }))
onChange({ ...formDataTokenomics, [name]: value })
}
@@ -343,7 +314,6 @@ const Tokenomics = ({
// logo: selectedOption.logo,
}
- setFormData(updatedFormData)
onChange(updatedFormData)
}
@@ -362,10 +332,6 @@ const Tokenomics = ({
}
}
const handleMaxClick = (balance: string, field: string) => {
- setFormData((prevFormData) => ({
- ...prevFormData,
- [field]: balance,
- }))
onChange({ ...formDataTokenomics, [field]: balance })
}
@@ -387,6 +353,8 @@ const Tokenomics = ({
formik.setFieldValue('shareAddress', formDataTokenomics.shareAddress)
formik.setFieldValue('shareInput', formDataTokenomics.shareInput)
formik.setFieldValue('assetInput', formDataTokenomics.assetInput)
+ setStartValue(formDataTokenomics.startWeight)
+ setEndValue(formDataTokenomics.endWeight)
}, [formDataTokenomics])
useEffect(() => {
@@ -456,7 +424,7 @@ const Tokenomics = ({
{shareTitle}
- Balance: {balances?.shareBalance}
+ Balance: {formDataTokenomics.shareAddress ? balances?.shareBalance : 0}
@@ -472,8 +440,13 @@ const Tokenomics = ({
onWheel={(event) => event.currentTarget.blur()}
/>
- handleMaxClick(balances?.shareBalance, 'shareInput') : undefined}>
- Max
+
+ handleMaxClick(balances?.shareBalance, 'shareInput') : undefined}
+ >
+ Max
+
@@ -541,8 +514,13 @@ const Tokenomics = ({
value={formDataTokenomics.assetInput}
onWheel={(event) => event.currentTarget.blur()}
/>
- handleMaxClick(balances?.assetBalance, 'assetInput') : undefined}>
- Max
+
+ handleMaxClick(balances?.assetBalance, 'assetInput') : undefined}
+ >
+ Max
+
@@ -640,6 +618,8 @@ const Tokenomics = ({
value={formDataTokenomics.startWeight}
onChange={handleChangeStart}
disabled={!isEditable}
+ min={1}
+ max={99}
/>
@@ -702,6 +682,8 @@ const Tokenomics = ({
value={formDataTokenomics.endWeight ? formDataTokenomics.endWeight : valueEnd}
onChange={handleChangeEnd}
disabled={!isEditable}
+ min={1}
+ max={99}
/>