1
- // NOSONAR_START
2
1
import { Box , Card , CardContent , Typography , Stack } from '@mui/material' ;
3
2
import { IconLock , IconPlayerPlay } from '@tabler/icons-react' ;
4
3
import { ethers } from 'ethers' ;
5
4
import { useGetPolicyTerms } from '@src/hooks/use-get-policy-terms.ts' ;
6
5
import { Address } from 'viem' ;
7
6
import LoadingButton from '@mui/lab/LoadingButton' ;
8
7
import { GLOBAL_CONSTANTS } from '@src/config-global.ts' ;
9
- // import {Icon} from "@iconify/react";
10
- // import NeonPaper from "@src/sections/publication/NeonPaperContainer.tsx";
11
- // import {useState} from "react";
12
- // import {COLORS} from "@src/layouts/config-layout.ts";
13
- // import {styled} from "@mui/material/styles";
14
8
15
9
interface Props {
16
10
post : any ;
@@ -24,8 +18,6 @@ export const SubscribeToUnlockCard = ({
24
18
loadingSubscribe,
25
19
post,
26
20
} : Props ) => {
27
- // const [loadingTrial, setLoadingTrial] = useState(false);
28
-
29
21
const { terms } = useGetPolicyTerms (
30
22
GLOBAL_CONSTANTS . SUBSCRIPTION_POLICY_ADDRESS as Address ,
31
23
post ?. by ?. ownedBy ?. address as Address
@@ -34,15 +26,6 @@ export const SubscribeToUnlockCard = ({
34
26
const totalCostWei = terms ?. amount ? terms ?. amount * BigInt ( durationDays ) : 0 ; // Calculate total cost in Wei: DAILY_COST_WEI * durationDays
35
27
const totalCostMMC = ethers . formatUnits ( totalCostWei , 18 ) ; // Converts Wei to MMC
36
28
37
- // const handleTrial = () => {
38
- // setLoadingTrial(true);
39
- // setTimeout(() => {
40
- // setLoadingTrial(false);
41
- // }, 2000);
42
- // };
43
-
44
- // const RainbowEffect = loadingTrial ? NeonPaper : Box;
45
-
46
29
return (
47
30
< Card
48
31
sx = { {
@@ -67,13 +50,6 @@ export const SubscribeToUnlockCard = ({
67
50
This content is exclusively for members. Become part of our growing community to access
68
51
behind-the-scenes content, exclusive posts, and much more!
69
52
</ Typography >
70
-
71
- < Box sx = { {
72
- display : 'flex' ,
73
- flexDirection : 'column' ,
74
- gap : 1.5 ,
75
- } } >
76
-
77
53
< LoadingButton
78
54
variant = "contained"
79
55
color = "primary"
@@ -85,19 +61,6 @@ export const SubscribeToUnlockCard = ({
85
61
< IconPlayerPlay size = { 20 } style = { { marginRight : 5 } } />
86
62
Join
87
63
</ LoadingButton >
88
- { /*<RainbowEffect borderRadius={'10px'}*/ }
89
- { /* animationSpeed={'3s'}*/ }
90
- { /* padding={'2px'}*/ }
91
- { /* width={'auto'}>*/ }
92
-
93
- { /* <StyledBoxGradient onClick={handleTrial} loading={loadingTrial}>*/ }
94
- { /* <Icon icon="ic:outline-try" width="18" height="18" />*/ }
95
- { /* <Typography variant="body2" sx={{ lineHeight: 1, fontWeight: '700', ml: 1 }}>*/ }
96
- { /* Free trial*/ }
97
- { /* </Typography>*/ }
98
- { /* </StyledBoxGradient>*/ }
99
- { /*</RainbowEffect>*/ }
100
- </ Box >
101
64
< Box sx = { { mt : 3 , borderRadius : 1 } } >
102
65
< Typography variant = "body2" color = "textSecondary" >
103
66
Join now for just < strong > { totalCostMMC } MMC/month</ strong > and access to{ ' ' }
@@ -109,22 +72,3 @@ export const SubscribeToUnlockCard = ({
109
72
</ Card >
110
73
) ;
111
74
} ;
112
-
113
- // const StyledBoxGradient = styled(LoadingButton)(() => ({
114
- // width: '100%',
115
- // background: `linear-gradient(90deg, rgba(254,255,118,1) 25%, rgba(212,190,58,1) 50%, rgba(189,119,255,0.5) 100%)`,
116
- // backgroundSize: '400%',
117
- // animation: 'gradientShift 10s infinite',
118
- // padding: '12px',
119
- // color: COLORS.GRAY_DARK,
120
- // borderRadius: '8px',
121
- // display: 'flex',
122
- // alignItems: 'center',
123
- // justifyContent: 'center',
124
- // '@keyframes gradientShift': {
125
- // '0%': { backgroundPosition: '0% 50%' },
126
- // '50%': { backgroundPosition: '100% 50%' },
127
- // '100%': { backgroundPosition: '0% 50%' },
128
- // },
129
- // }));
130
- // NOSONAR_END
0 commit comments