Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f62268d
fix(ActionRow): correct button label logic for activation state
sumansaurabh Feb 20, 2025
23e972a
fix(ActionRow): correct button label and style logic for activation s…
sumansaurabh Feb 20, 2025
3a830fb
refactor(Payments): update component structure and rename navigation …
sumansaurabh Feb 20, 2025
d136313
fix(PaymentsTable): enhance pagination styles for better visibility a…
sumansaurabh Feb 20, 2025
a5cbe6f
refactor(BaseTable): remove border-radius from container for consiste…
sumansaurabh Feb 20, 2025
b0a0416
refactor(PaymentHistory, PaymentPricing): integrate BaseButtonsForm f…
sumansaurabh Feb 20, 2025
1d37609
fix(BaseDropdown): update getPopupContainer to use document.body for …
sumansaurabh Feb 20, 2025
d2c5192
feat(Coupons): add neumorphic styling and restructure component layou…
sumansaurabh Feb 20, 2025
2791b86
refactor(sidebarNavigation): remove coupon section from sidebar navig…
sumansaurabh Feb 20, 2025
32c0910
refactor(App): simplify user profile reload logic by removing unneces…
sumansaurabh Feb 20, 2025
ef165e6
refactor(SecurityCodeForm, BaseButton, AuthLayout): enhance button st…
sumansaurabh Feb 20, 2025
74703f5
refactor(App, userSlice): streamline user profile fetching and improv…
sumansaurabh Feb 20, 2025
5c03ded
refactor(App, MainLayout, userSlice): optimize user profile fetching …
sumansaurabh Feb 20, 2025
9932213
refactor(PaymentPricing): center CheckoutModal and adjust z-index for…
sumansaurabh Feb 20, 2025
e8873e3
refactor(DashboardTerminal, DocumentationCard): invert premium access…
sumansaurabh Feb 20, 2025
a6c4633
refactor(DocumentationCard): enhance text color and button styling fo…
sumansaurabh Feb 20, 2025
7cedf56
refactor(DocumentationCard): update modal styling with gradients and …
sumansaurabh Feb 20, 2025
80534ea
refactor(DocumentationCard): adjust button font sizes for consistency…
sumansaurabh Feb 20, 2025
e1be460
refactor(DocumentationCard): improve modal layout and styling for bet…
sumansaurabh Feb 20, 2025
efc0c72
refactor(DocumentationCard): enhance button styling with neumorphic e…
sumansaurabh Feb 20, 2025
32843d1
refactor(DashboardTerminal): remove redundant card body styling for c…
sumansaurabh Feb 20, 2025
8dd3a22
refactor(DocumentationCard): add progress indicator and pulsing anima…
sumansaurabh Feb 20, 2025
3b1bba5
refactor(PaymentPricing): enhance modal styling and animations for im…
sumansaurabh Feb 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,19 @@ import { getThemeConfig } from './styles/themeConfig';
import { trackClicks } from './config/mixpanel';
import { trackGAClicks } from './config/ga';
import { reloadUserProfile } from './api/user.api';
import { setUser } from './store/slices/userSlice';
import { fetchUserProfile, setUser } from './store/slices/userSlice';

const App: React.FC = () => {
const { language } = useLanguage();
const theme = useAppSelector((state) => state.theme.theme);
const user = useAppSelector(state => state.user.user);
const currentTheme = themeObject[theme];
const themeConfig = React.useMemo(() => getThemeConfig(currentTheme), [currentTheme]);
const dispatch = useAppDispatch();

useEffect(() => {
if (!user) {
reloadUserProfile()
.then((data) => dispatch(setUser(data)))
.catch((err) => console.error(err));
}
}, [user, dispatch]);

useEffect(() => {
document.addEventListener('click', event => trackClicks(event, user));
return () => document.removeEventListener('click', event => trackClicks(event, user));
}, [user]);
}, []);

useEffect(() => {
document.addEventListener('click', trackGAClicks);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export const VerifyEmailDescription = styled.div`
`;

export const NoCodeText = styled.div`
margin-top: 1rem;
color: ${({ theme }) => theme.primary};
font-size: ${({ theme }) => theme.fontSizes.xs};
font-weight: ${({ theme }) => theme.fontWeights.regular};
Expand Down
1 change: 1 addition & 0 deletions src/components/auth/SecurityCodeForm/SecurityCodeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export const SecurityCodeForm: React.FC<SecurityCodeFormProps> = ({
) : (
<VerificationCodeInput autoFocus onChange={setSecurityCode} />
)}
<br></br>
<BaseButton type="link" onClick={() => onResendCode?.()}>
<S.NoCodeText>{t('auth.securityCodeNoCode')}</S.NoCodeText>
</BaseButton>
Expand Down
1 change: 0 additions & 1 deletion src/components/common/BaseButton/BaseButton.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Button as AntButton } from 'antd';

export const Button = styled(AntButton)`
&& {
height: 40px;
padding: 0 24px;
border: none;
border-radius: 20px;
Expand Down
7 changes: 5 additions & 2 deletions src/components/common/BaseDropdown/BaseDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ interface BaseDropdownProps extends DropdownProps {
children?: ReactNode;
}

export const BaseDropdown: React.FC = ({ children, ...props }: BaseDropdownProps) => {
export const BaseDropdown: React.FC<BaseDropdownProps> = ({ children, ...props }) => {
return (
<S.Dropdown getPopupContainer={(triggerNode) => triggerNode} {...props}>
<S.Dropdown
getPopupContainer={() => document.body}
{...props}
>
{children}
</S.Dropdown>
);
Expand Down
1 change: 0 additions & 1 deletion src/components/common/BaseTable/BaseTable.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export const Table = styled(AntTable)`

/* Remove default AntD container border for "bordered" tables */
.ant-table-container {
border-radius: 16px; /* Ensures corners are consistently rounded */
background: transparent; /* Let the parent's gradient show through */
overflow: hidden;
}
Expand Down
59 changes: 59 additions & 0 deletions src/components/coupons/Coupons.styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import styled from 'styled-components';
import { BaseCard } from '../common/BaseCard/BaseCard';
import { BaseButton } from '../common/BaseButton/BaseButton';

export const NeumorphicContainer = styled.div`
background: #2a2a2a;
border-radius: 20px;
padding: 2rem;
box-shadow:
8px 8px 16px rgba(0, 0, 0, 0.4),
-8px -8px 16px rgba(255, 255, 255, 0.05);
`;

export const StatsCard = styled(BaseCard)`
background: linear-gradient(145deg, #2d2d2d, #262626);
border: none;
border-radius: 15px;

/* Convex effect */
box-shadow:
6px 6px 12px rgba(0, 0, 0, 0.5),
-6px -6px 12px rgba(255, 255, 255, 0.05);

&:hover {
transform: translateY(-2px);
}
`;

export const RedeemButton = styled(BaseButton)`
/* Concave effect when not pressed */
background: linear-gradient(145deg, #262626, #2d2d2d);
border: none;
box-shadow:
inset 4px 4px 8px rgba(0, 0, 0, 0.5),
inset -4px -4px 8px rgba(255, 255, 255, 0.05);

/* Pressed state */
&:active {
background: linear-gradient(145deg, #2d2d2d, #262626);
box-shadow:
inset 6px 6px 12px rgba(0, 0, 0, 0.7),
inset -6px -6px 12px rgba(255, 255, 255, 0.07);
}
`;

export const StatsContainer = styled.div`
display: flex;
gap: 1rem;
margin-bottom: 2rem;

/* Flat neumorphic effect */
background: #2a2a2a;
padding: 1.5rem;
border-radius: 15px;
border: 1px solid rgba(255, 255, 255, 0.05);
box-shadow:
4px 4px 8px rgba(0, 0, 0, 0.2),
-4px -4px 8px rgba(255, 255, 255, 0.03);
`;
42 changes: 21 additions & 21 deletions src/components/coupons/Coupons.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { useAppSelector } from '@app/hooks/reduxHooks';
import { BaseRow } from '../common/BaseRow/BaseRow';
import { isEmailValid } from '@app/utils/utils';
import { BaseButton } from '../common/BaseButton/BaseButton';
import { useTranslation } from 'react-i18next';
import { BaseCol } from '../common/BaseCol/BaseCol';
import { useNavigate } from 'react-router-dom';
import { useResponsive } from '@app/hooks/useResponsive';
import { BaseCard } from '../common/BaseCard/BaseCard';
import { BaseSpace } from '../common/BaseSpace/BaseSpace';
import { CouponTable } from './couponTable/CouponTable';
import { EmailUpdateForm } from '../auth/EmailUpdateForm/EmailUpdateForm';
import { NeumorphicContainer, RedeemButton, StatsContainer } from './Coupons.styles';
import { BaseRow } from '../common/BaseRow/BaseRow';
import { BaseCol } from '../common/BaseCol/BaseCol';
import { BaseCard } from '../common/BaseCard/BaseCard';

export const Coupons = () => {
const { t } = useTranslation();
Expand All @@ -19,23 +18,24 @@ export const Coupons = () => {
const navigate = useNavigate();

const content = (
<BaseRow gutter={[0, 20]}>
<BaseCol span={24}>
{!(user?.email && isEmailValid(user.email.name)) ? (
<BaseSpace align="center" style={{ color: '#ffa500' }}>
*
<BaseButton type="link" onClick={() => navigate('/redeem-coupon')} style={{ padding: '0' }}>
{t('common.clickHere')}
</BaseButton>
{t('common.addEmailWarning')}
</BaseSpace>
) : null}
</BaseCol>
<NeumorphicContainer>
<BaseRow gutter={[0, 20]}>
<BaseCol span={24}>
{!(user?.email && isEmailValid(user.email.name)) ? (
<StatsContainer>
Please<a type="link" onClick={() => window.open('/redeem-coupon', '_self')}>
click here
</a>
<span style={{ color: '#ffa500' }}>{t('common.addEmailWarning')}</span>
</StatsContainer>
) : null}
</BaseCol>

<BaseCol span={24}>
<CouponTable />
</BaseCol>
</BaseRow>
<BaseCol span={24}>
<CouponTable />
</BaseCol>
</BaseRow>
</NeumorphicContainer>
);

if (!user) return null;
Expand Down
10 changes: 2 additions & 8 deletions src/components/dashboard/DashboardTerminal/DashboardTerminal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ const PremiumDocCard = styled(DocumentationCard)`
font-weight: bold;
}

/* Style the card body */
.ant-card-body {
background-color: rgba(255, 255, 255, 0.1);
color: #fff;
padding: 1.5rem;
}

/* Add a diagonal 'PREMIUM' badge */
&::after {
content: 'PREMIUM';
Expand Down Expand Up @@ -77,9 +70,10 @@ export const DashboardTerminal: React.FC<DashboardTerminalProps> = ({ repoDetail
const user = useAppSelector((state) => state.user.user);
if (!user) return null;
if (!repoDetails) return null;
let shouldShowPremium = [PlanType.PREMIUM, PlanType.PRO].includes(repoDetails.plan_type);
let shouldShowPremium = ![PlanType.PREMIUM, PlanType.PRO].includes(repoDetails.plan_type);
shouldShowPremium = shouldShowPremium || user.countRepoGen > 0;




return (
Expand Down
Loading