Skip to content

Commit

Permalink
condition removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Aliyanishere committed Apr 7, 2024
1 parent 7c0b466 commit 1f05798
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions components/home/tabs/mine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { AuthActionsWithoutThunk } from "@/store/auth";

const MineTab = () => {
const dispatch = useDispatch();
const { fetchMineResourcesData, userLevelInfo } = Utils();
const { fetchMineResourcesData } = Utils();
const { publicKey } = useWallet();
const [mineData, setMineData] = useState([]);
const { user } = useHoneycomb();
Expand Down Expand Up @@ -64,30 +64,28 @@ const MineTab = () => {
key={index}
name={data?.metadata?.name}
picture={data?.metadata?.uri}
level={data?.level_req}
// level={data?.level_req}
buttonText="Mine"
width={150}
imageWidth={80}
imageHeight={100}
nftNameStyle="text-[15px] pr-1"
btnStyle="bg-gradient-to-b from-[#8E8B77] to-[#30302E] text-xs h-6 w-24 h-6 font-bold drop-shadow-lg"
expIn={data?.expire}
resourceInfo={
userLevelInfo.level < data?.level_req
? `User level ${data?.level_req} is required to mine this resource.`
: ""
}
// resourceInfo={
// userLevelInfo.level < data?.level_req
// ? `User level ${data?.level_req} is required to mine this resource.`
// : ""
// }
btnDisabled={
data?.expire - Date.now() > 0 ||
loading.name === data.metadata?.name ||
userLevelInfo.level < data?.level_req
loading.name === data.metadata?.name
// ||
// userLevelInfo.level < data?.level_req
}
btnClick={async () =>
userLevelInfo.level >= data?.level_req &&
(await mineResource(
data?.addresses?.resource,
data.metadata?.name
))
// userLevelInfo.level >= data?.level_req &&
await mineResource(data?.addresses?.resource, data.metadata?.name)
}
loading={loading}
/>
Expand Down

0 comments on commit 1f05798

Please sign in to comment.