Skip to content

Commit 8f0ce04

Browse files
authored
Merge pull request #149 from LasticXYZ/fixes
Fixes
2 parents 077858a + 13337d7 commit 8f0ce04

File tree

19 files changed

+136
-86
lines changed

19 files changed

+136
-86
lines changed

src/app/(Website)/WorldMap.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ const WorldMap = () => {
1818
<div className="m-auto w-full md:w-2/5 max-w-xl px-4">
1919
{/* Text section */}
2020
<div className="flex flex-col space-y-4">
21-
<h6 className="uppercase text-sm sm:text-md text-pink-4 font-bold font-inter">Join us</h6>
21+
<h6 className="uppercase text-sm sm:text-md text-pink-300 font-bold font-inter">
22+
Join us
23+
</h6>
2224
<h1 className="text-3xl sm:text-4xl md:text-5xl font-bold leading-tight font-syne">
2325
Join traders and builders around the world
2426
</h1>

src/app/[network]/(App)/bulkcore1/CoreUtilisation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const CoreUtilisation: React.FC = () => {
6161
<button
6262
key={key}
6363
onClick={() => toggleActiveDataSet(key as DataSetKey)}
64-
className={`py-2 px-4 text-left hover:font-semibold border-b border-gray-18 ${activeDataSet === key ? 'text-pink-5 dark:text-pink-400 font-semibold' : 'text-gray-16'}`}
64+
className={`py-2 px-4 text-left hover:font-semibold border-b border-gray-18 ${activeDataSet === key ? 'text-pink-500 dark:text-pink-400 font-semibold' : 'text-gray-16'}`}
6565
>
6666
{dataConfigs[key as DataSetKey].label}
6767
</button>

src/app/[network]/(App)/bulkcore1/TimeSection.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import WalletStatus from '@/components/walletStatus/WalletStatus'
55
import { network_list } from '@/config/network'
66
import { useCurrentBlockNumber, useSubstrateQuery } from '@/hooks/useSubstrateQuery'
77
import { saleStatus } from '@/utils/broker'
8+
import { StatusCode } from '@/utils/broker/saleStatus'
89
import { getChainFromPath } from '@/utils/common/chainPath'
910
import {
1011
ConfigurationType,
@@ -59,10 +60,11 @@ export default function BrokerSaleInfo() {
5960
// Update saleStage every second based on the currentBlockNumber
6061
const [saleStage, setSaleStage] = useState('')
6162
const [saleTitle, setSaleTitle] = useState('')
63+
const [statusCode, setStatusCode] = useState<StatusCode | null>(null)
6264
const [timeRemaining, setTimeRemaining] = useState('')
6365
useEffect(() => {
6466
if (saleInfo && configuration && brokerConstants) {
65-
const { statusMessage, timeRemaining, statusTitle } = saleStatus(
67+
const { statusMessage, timeRemaining, statusTitle, statusCode } = saleStatus(
6668
currentBlockNumber,
6769
saleInfo,
6870
configuration,
@@ -71,6 +73,7 @@ export default function BrokerSaleInfo() {
7173
setTimeRemaining(timeRemaining)
7274
setSaleTitle(statusTitle)
7375
setSaleStage(statusMessage)
76+
setStatusCode(statusCode)
7477
}
7578
}, [currentBlockNumber, saleInfo, configuration, brokerConstants])
7679

@@ -148,7 +151,7 @@ export default function BrokerSaleInfo() {
148151
<Border>
149152
<div className=" p-10">
150153
<div>
151-
<div className="flex justify-between rounded-full mx-10 bg-pink-4 dark:bg-pink-400 dark:bg-opacity-95 px-16 py-10 bg-opacity-30 items-center my-6">
154+
<div className="flex justify-between rounded-full mx-10 bg-pink-300 dark:bg-pink-400 dark:bg-opacity-95 px-16 py-10 bg-opacity-30 items-center my-6">
152155
<div className="text-xl xl:text-2xl font-bold font-unbounded uppercase text-gray-21 dark:text-white ">
153156
{saleTitle}
154157
</div>
@@ -181,6 +184,7 @@ export default function BrokerSaleInfo() {
181184
saleInfo={saleInfo}
182185
formatPrice={`${(currentPrice / 10 ** 12).toFixed(8)} ${tokenSymbol}`}
183186
currentPrice={currentPrice}
187+
statusCode={statusCode}
184188
/>
185189
</Border>
186190
</div>

src/app/[network]/(App)/core/[number]/[regionId]/[mask]/Core.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,11 @@ const BrokerRegionData: FC<BrokerRegionDataProps> = ({ coreNb, regionId, mask })
149149
<div>
150150
<div className="">
151151
<CoreItemExtensive
152-
timeBought="Jan 2024"
152+
timeBought="- 2024"
153153
owner={region.owner.owner}
154154
amITheOwner={region.owner.owner === activeAccount.address}
155155
paid={region.owner.paid}
156156
coreNumber={region.detail[0].core}
157-
size="1"
158157
phase="- Period"
159158
cost={parseNativeTokenToHuman({ paid: region.owner.paid, decimals: tokenDecimals })}
160159
currencyCost={tokenSymbol}
@@ -172,7 +171,7 @@ const BrokerRegionData: FC<BrokerRegionDataProps> = ({ coreNb, regionId, mask })
172171
<Border>
173172
<div className="p-10">
174173
<div>
175-
<div className="flex justify-between rounded-full mx-10 bg-pink-4 dark:bg-pink-400 px-16 py-10 bg-opacity-30 dark:bg-opacity-80 items-center my-6">
174+
<div className="flex justify-between rounded-full mx-10 bg-pink-300 dark:bg-pink-400 px-16 py-10 bg-opacity-30 dark:bg-opacity-80 items-center my-6">
176175
<div className="text-xl font-bold font-unbounded uppercase text-gray-21">
177176
{saleTitle}
178177
</div>

src/components/activityBoxes/BoxesContainer.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,21 @@ const SquareBoxesContainer: React.FC<SquareBoxesContainerProps> = ({
101101
<div className="flex flex-wrap justify-center items-center gap-4">{squareBoxes} </div>
102102
<div className="flex justify-around mt-8">
103103
<button
104-
className="rounded-ful font-black rounded-2xl bg-pink-2 hover:bg-pink-4 border border-gray-8 text-xs inline-flex items-center justify-center p-2 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-2 focus:ring-primary-3"
104+
className="rounded-ful font-black rounded-2xl bg-pink-2 hover:bg-pink-300 border border-gray-8 text-xs inline-flex items-center justify-center p-2 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-2 focus:ring-primary-3"
105105
onClick={handleSetHalfToTrue}
106106
>
107107
50/50
108108
</button>
109109

110110
<button
111-
className="rounded-ful font-black rounded-2xl bg-pink-2 hover:bg-pink-4 border border-gray-8 text-xs inline-flex items-center justify-center p-2 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-2 focus:ring-primary-3"
111+
className="rounded-ful font-black rounded-2xl bg-pink-2 hover:bg-pink-300 border border-gray-8 text-xs inline-flex items-center justify-center p-2 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-2 focus:ring-primary-3"
112112
onClick={handleSetAlternateToTrue}
113113
>
114114
Alternating
115115
</button>
116116

117117
<button
118-
className="rounded-ful font-black rounded-2xl bg-pink-2 hover:bg-pink-4 border border-gray-8 text-xs inline-flex items-center justify-center p-2 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-2 focus:ring-primary-3"
118+
className="rounded-ful font-black rounded-2xl bg-pink-2 hover:bg-pink-300 border border-gray-8 text-xs inline-flex items-center justify-center p-2 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-2 focus:ring-primary-3"
119119
onClick={handleReset}
120120
>
121121
Reset

src/components/broker/extrinsics/PartitionCoreModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ const PartitionCoreModal: FC<PartitionCoreModalProps> = ({ isOpen, onClose, regi
160160
<div className="flex flex-col p-4 ">
161161
<div className="pb-8">
162162
<div className="mx-10 mt-4 mb-24 relative">
163-
<div className="w-full bg-pink-4 bg-opacity-20 h-3 rounded-full overflow-hidden">
163+
<div className="w-full bg-pink-300 bg-opacity-20 h-3 rounded-full overflow-hidden">
164164
<div
165-
className="bg-pink-4 bg-opacity-50 h-full"
165+
className="bg-pink-300 bg-opacity-50 h-full"
166166
style={{ width: `${pivotPercentage}%` }}
167167
></div>
168168
</div>

src/components/button/PrimaryButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const PrimaryButton: FC<PrimaryButtonProps> = ({
2020
<button
2121
onClick={onClick}
2222
disabled={disabled}
23-
className={`${disabled ? 'bg-gray-2 dark:bg-gray-20 dark:text-gray-14 text-gray-14 cursor-not-allowed' : 'bg-pink-4 dark:bg-pink-400 hover:bg-pink-5 dark:hover:bg-pink-500 text-black dark:text-gray-1 cursor-pointer'} rounded-ful font-unbounded uppercase font-black rounded-2xl border border-gray-8 dark:border-gray-18 text-xs inline-flex items-center justify-center px-12 py-3 mr-3 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-4 focus:ring-primary-3`}
23+
className={`${disabled ? 'bg-gray-2 dark:bg-gray-20 dark:text-gray-14 text-gray-14 cursor-not-allowed' : 'bg-pink-300 dark:bg-pink-400 hover:bg-pink-5 dark:hover:bg-pink-500 text-black dark:text-gray-1 cursor-pointer'} rounded-ful font-unbounded uppercase font-black rounded-2xl border border-gray-8 dark:border-gray-18 text-xs inline-flex items-center justify-center px-12 py-3 mr-3 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-4 focus:ring-primary-3`}
2424
>
2525
{title}
2626
</button>
@@ -29,7 +29,7 @@ const PrimaryButton: FC<PrimaryButtonProps> = ({
2929
return (
3030
<Link
3131
href={location}
32-
className="rounded-ful font-unbounded uppercase font-black rounded-2xl bg-pink-4 dark:bg-pink-400 hover:bg-pink-5 dark:hover:bg-pink-500 border border-gray-8 dark:border-gray-18 text-xs inline-flex items-center justify-center px-12 py-3 mr-3 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-4 focus:ring-primary-3"
32+
className="rounded-ful font-unbounded uppercase font-black rounded-2xl bg-pink-300 dark:bg-pink-400 hover:bg-pink-5 dark:hover:bg-pink-500 border border-gray-8 dark:border-gray-18 text-xs inline-flex items-center justify-center px-12 py-3 mr-3 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-4 focus:ring-primary-3"
3333
>
3434
{title}
3535
</Link>

src/components/button/PrimaryButtonWeb.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const PrimaryButtonWeb: FC<PrimaryButtonProps> = ({
2020
<button
2121
onClick={onClick}
2222
disabled={disabled}
23-
className={`${disabled ? 'bg-gray-2 text-gray-14 cursor-not-allowed' : ' bg-gradient-to-r from-purple-4 to-primary-5 hover:bg-pink-4 text-white cursor-pointer'} rounded-ful font-syne font-black rounded-2xl border border-gray-8 text-md inline-flex items-center justify-center px-12 py-3 mr-3 text-center text-black hover:bg-primary-800 focus:ring-4 focus:ring-primary-3`}
23+
className={`${disabled ? 'bg-gray-2 text-gray-14 cursor-not-allowed' : ' bg-gradient-to-r from-purple-4 to-primary-5 hover:bg-pink-300 text-white cursor-pointer'} rounded-ful font-syne font-black rounded-2xl border border-gray-8 text-md inline-flex items-center justify-center px-12 py-3 mr-3 text-center text-black hover:bg-primary-800 focus:ring-4 focus:ring-primary-3`}
2424
>
2525
{title}
2626
</button>
@@ -29,7 +29,7 @@ const PrimaryButtonWeb: FC<PrimaryButtonProps> = ({
2929
return (
3030
<Link
3131
href={location}
32-
className="rounded-ful font-syne font-black rounded-2xl bg-gradient-to-r from-pink-4 to-purple-5 hover:from-pink-5 hover:to-purple-6 border border-gray-16 text-md inline-flex items-center justify-center px-12 py-3 mr-3 text-center text-white hover:bg-primary-800 focus:ring-4 focus:ring-primary-3"
32+
className="rounded-ful font-syne font-black rounded-2xl bg-gradient-to-r from-pink-300 to-purple-5 hover:from-pink-5 hover:to-purple-6 border border-gray-16 text-md inline-flex items-center justify-center px-12 py-3 mr-3 text-center text-white hover:bg-primary-800 focus:ring-4 focus:ring-primary-3"
3333
>
3434
{title}
3535
</Link>

src/components/button/PrimaryButtonWithAutoTeleport.tsx

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ import PrimaryButton, { PrimaryButtonProps } from '@/components/button/PrimaryBu
22
import ModalNotification from '@/components/modal/ModalNotification'
33
import ModalTranasaction from '@/components/modal/ModalTransaction'
44
import { useTeleport } from '@/hooks/useTeleport'
5-
import { FormControlLabel, Switch } from '@mui/material'
65
import { BN } from '@polkadot/util'
7-
import { FC, useState } from 'react'
6+
import { FC } from 'react'
87

98
export interface PrimaryButtonWithAutoTeleportProps extends PrimaryButtonProps {
109
/** Amount needed for the action. Determines if teleport will happen or not. */
@@ -21,7 +20,7 @@ const PrimaryButtonWithAutoTeleport: FC<PrimaryButtonWithAutoTeleportProps> = ({
2120
amountNeeded,
2221
teleportTo,
2322
}) => {
24-
const [autoTeleportEnabled, setAutoTeleportEnabled] = useState(true)
23+
const autoTeleportEnabled = true
2524
const { autoTeleport, notification, setNotification, isTeleporting, teleportMessage } =
2625
useTeleport(onClick)
2726

@@ -35,19 +34,6 @@ const PrimaryButtonWithAutoTeleport: FC<PrimaryButtonWithAutoTeleportProps> = ({
3534

3635
return (
3736
<div className="flex flex-col items-center gap-3">
38-
<FormControlLabel
39-
disabled={disabled}
40-
control={
41-
<Switch
42-
checked={autoTeleportEnabled}
43-
onChange={(e) => setAutoTeleportEnabled(e.target.checked)}
44-
size="small"
45-
sx={switchStyle}
46-
/>
47-
}
48-
label="Auto Teleport"
49-
/>
50-
5137
<PrimaryButton title={title} location={location} onClick={handleClick} disabled={disabled} />
5238

5339
<ModalNotification
@@ -62,16 +48,4 @@ const PrimaryButtonWithAutoTeleport: FC<PrimaryButtonWithAutoTeleportProps> = ({
6248
)
6349
}
6450

65-
const switchStyle = {
66-
'& .MuiSwitch-switchBase.Mui-checked': {
67-
color: '#FF6370',
68-
},
69-
'& .MuiSwitch-switchBase + .MuiSwitch-track': {
70-
backgroundColor: '#E6B3CA',
71-
},
72-
'& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track': {
73-
backgroundColor: '#E6B3CA',
74-
},
75-
}
76-
7751
export default PrimaryButtonWithAutoTeleport

src/components/button/SecondaryButtonWeb.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const SecondaryButtonWeb: FC<PrimaryButtonProps> = ({
2020
<button
2121
onClick={onClick}
2222
disabled={disabled}
23-
className={`${disabled ? 'bg-gray-2 text-gray-14 cursor-not-allowed' : ' bg-gradient-to-r from-purple-4 to-primary-5 hover:bg-pink-4 text-white cursor-pointer'} rounded-ful font-syne font-black rounded-2xl text-md inline-flex items-center justify-center px-12 py-3 mr-3 text-center text-white hover:bg-primary-800 focus:ring-4 focus:ring-primary-3`}
23+
className={`${disabled ? 'bg-gray-2 text-gray-14 cursor-not-allowed' : ' bg-gradient-to-r from-purple-4 to-primary-5 hover:bg-pink-300 text-white cursor-pointer'} rounded-ful font-syne font-black rounded-2xl text-md inline-flex items-center justify-center px-12 py-3 mr-3 text-center text-white hover:bg-primary-800 focus:ring-4 focus:ring-primary-3`}
2424
>
2525
{title}
2626
</button>

0 commit comments

Comments
 (0)