Skip to content

Commit

Permalink
refactor: clean unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Jadapema committed Jan 30, 2025
1 parent f60e0a8 commit 5c83371
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 515 deletions.
56 changes: 0 additions & 56 deletions src/components/subscribe-to-unlock-card.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
// NOSONAR_START
import { Box, Card, CardContent, Typography, Stack } from '@mui/material';
import { IconLock, IconPlayerPlay } from '@tabler/icons-react';
import { ethers } from 'ethers';
import { useGetPolicyTerms } from '@src/hooks/use-get-policy-terms.ts';
import { Address } from 'viem';
import LoadingButton from '@mui/lab/LoadingButton';
import { GLOBAL_CONSTANTS } from '@src/config-global.ts';
// import {Icon} from "@iconify/react";
// import NeonPaper from "@src/sections/publication/NeonPaperContainer.tsx";
// import {useState} from "react";
// import {COLORS} from "@src/layouts/config-layout.ts";
// import {styled} from "@mui/material/styles";

interface Props {
post: any;
Expand All @@ -24,8 +18,6 @@ export const SubscribeToUnlockCard = ({
loadingSubscribe,
post,
}: Props) => {
// const [loadingTrial, setLoadingTrial] = useState(false);

const { terms } = useGetPolicyTerms(
GLOBAL_CONSTANTS.SUBSCRIPTION_POLICY_ADDRESS as Address,
post?.by?.ownedBy?.address as Address
Expand All @@ -34,15 +26,6 @@ export const SubscribeToUnlockCard = ({
const totalCostWei = terms?.amount ? terms?.amount * BigInt(durationDays) : 0; // Calculate total cost in Wei: DAILY_COST_WEI * durationDays
const totalCostMMC = ethers.formatUnits(totalCostWei, 18); // Converts Wei to MMC

// const handleTrial = () => {
// setLoadingTrial(true);
// setTimeout(() => {
// setLoadingTrial(false);
// }, 2000);
// };

// const RainbowEffect = loadingTrial ? NeonPaper : Box;

return (
<Card
sx={{
Expand All @@ -67,13 +50,6 @@ export const SubscribeToUnlockCard = ({
This content is exclusively for members. Become part of our growing community to access
behind-the-scenes content, exclusive posts, and much more!
</Typography>

<Box sx={{
display: 'flex',
flexDirection: 'column',
gap: 1.5,
}}>

<LoadingButton
variant="contained"
color="primary"
Expand All @@ -85,19 +61,6 @@ export const SubscribeToUnlockCard = ({
<IconPlayerPlay size={20} style={{ marginRight: 5 }} />
Join
</LoadingButton>
{/*<RainbowEffect borderRadius={'10px'}*/}
{/* animationSpeed={'3s'}*/}
{/* padding={'2px'}*/}
{/* width={'auto'}>*/}

{/* <StyledBoxGradient onClick={handleTrial} loading={loadingTrial}>*/}
{/* <Icon icon="ic:outline-try" width="18" height="18" />*/}
{/* <Typography variant="body2" sx={{ lineHeight: 1, fontWeight: '700', ml: 1 }}>*/}
{/* Free trial*/}
{/* </Typography>*/}
{/* </StyledBoxGradient>*/}
{/*</RainbowEffect>*/}
</Box>
<Box sx={{ mt: 3, borderRadius: 1 }}>
<Typography variant="body2" color="textSecondary">
Join now for just <strong>{totalCostMMC} MMC/month</strong> and access to{' '}
Expand All @@ -109,22 +72,3 @@ export const SubscribeToUnlockCard = ({
</Card>
);
};

// const StyledBoxGradient = styled(LoadingButton)(() => ({
// width: '100%',
// background: `linear-gradient(90deg, rgba(254,255,118,1) 25%, rgba(212,190,58,1) 50%, rgba(189,119,255,0.5) 100%)`,
// backgroundSize: '400%',
// animation: 'gradientShift 10s infinite',
// padding: '12px',
// color: COLORS.GRAY_DARK,
// borderRadius: '8px',
// display: 'flex',
// alignItems: 'center',
// justifyContent: 'center',
// '@keyframes gradientShift': {
// '0%': { backgroundPosition: '0% 50%' },
// '50%': { backgroundPosition: '100% 50%' },
// '100%': { backgroundPosition: '0% 50%' },
// },
// }));
// NOSONAR_END
20 changes: 0 additions & 20 deletions src/pages/dashboard/marketing.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
// NOSONAR_START
import BlankView from '../../sections/blank/view';
import ComingSoonView from '../../sections/coming-soon/view';
// import {useSelector} from "react-redux";
// import {canViewSection} from "@src/pages/dashboard/ownership.tsx";
// import Header from "@src/layouts/dashboard/header.tsx";
// import HeaderContent from "@src/layouts/dashboard/header-content.tsx";
// import MarketingView from "@src/sections/marketing";
import { GLOBAL_CONSTANTS } from '@src/config-global.ts';
import { OgMetaTags } from '@src/components/og-meta-tags.tsx';

// ----------------------------------------------------------------------

export default function ChatPage() {
// const sessionData = useSelector((state: any) => state.auth.session);
return (
<OgMetaTags
title="Watchit: Marketing (COMING SOON)"
Expand All @@ -22,19 +15,6 @@ export default function ChatPage() {
<BlankView>
<ComingSoonView />
</BlankView>

{/*{*/}
{/* canViewSection(sessionData) ? (<><Header>*/}
{/* <HeaderContent title="Marketing" />*/}
{/* </Header>*/}
{/* <MarketingView />*/}
{/* </>) : (<>*/}
{/* <BlankView>*/}
{/* <ComingSoonView />*/}
{/* </BlankView>*/}
{/* </>)*/}
{/*}*/}
</OgMetaTags>
);
}
// NOSONAR_END
117 changes: 0 additions & 117 deletions src/sections/marketing/components/marketing-process-content-modal.tsx

This file was deleted.

22 changes: 0 additions & 22 deletions src/sections/marketing/components/marketing-process-modal.tsx

This file was deleted.

88 changes: 0 additions & 88 deletions src/sections/marketing/components/marketing-process.tsx

This file was deleted.

Loading

0 comments on commit 5c83371

Please sign in to comment.