Skip to content

Commit 1f9c182

Browse files
committed
fix: resolve frontend CI/CD errors
- Exclude ../api from frontend tsconfig to fix missing module errors - Create basic tsconfig.json for api directory - Fix TypeScript errors in Card.tsx (missing props, unused vars) - Fix TypeScript errors in ModernLoginPage.tsx (validator types)
1 parent 9d4206f commit 1f9c182

4 files changed

Lines changed: 31 additions & 9 deletions

File tree

api/tsconfig.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2020",
4+
"module": "NodeNext",
5+
"moduleResolution": "NodeNext",
6+
"lib": ["ES2020"],
7+
"outDir": "./dist",
8+
"rootDir": "./",
9+
"strict": true,
10+
"esModuleInterop": true,
11+
"skipLibCheck": true,
12+
"forceConsistentCasingInFileNames": true,
13+
"resolveJsonModule": true,
14+
"types": ["node", "express"]
15+
},
16+
"include": ["**/*.ts"],
17+
"exclude": ["node_modules", "dist"]
18+
}

frontend/components/ModernLoginPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ export function ModernLoginPage() {
4848
const formErrors = validateForm(
4949
{ email: formData.email, password: formData.password },
5050
{
51-
email: validators.email,
52-
password: validators.required,
51+
email: (val) => validators.email(val as string),
52+
password: (val) => validators.required(val as string | null | undefined),
5353
}
5454
);
5555

frontend/components/ui/Card.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,32 @@ import React, { ReactNode } from 'react';
22
import { cn } from '@/lib/utils';
33

44
export interface CardProps {
5-
children: React.ReactNode;
5+
children?: React.ReactNode;
66
className?: string;
77
onClick?: () => void;
88
hoverable?: boolean;
99
}
1010

1111
export interface CardHeaderProps {
12-
children: React.ReactNode;
12+
children?: React.ReactNode;
1313
className?: string;
1414
title?: string;
15+
subtitle?: string;
1516
action?: ReactNode;
1617
}
1718

1819
export interface CardTitleProps {
19-
children: React.ReactNode;
20+
children?: React.ReactNode;
2021
className?: string;
2122
}
2223

2324
export interface CardContentProps {
24-
children: React.ReactNode;
25+
children?: React.ReactNode;
2526
className?: string;
2627
}
2728

2829
export interface CardFooterProps {
29-
children: React.ReactNode;
30+
children?: React.ReactNode;
3031
className?: string;
3132
align?: 'left' | 'center' | 'right' | 'between';
3233
}
@@ -67,13 +68,17 @@ export const CardHeader: React.FC<CardHeaderProps> = ({
6768
children,
6869
className,
6970
title,
71+
subtitle,
7072
action,
7173
}) => {
7274
return (
7375
<div className={cn('mb-4 pb-4 border-b border-gray-200', className)}>
7476
{title ? (
7577
<div className="flex justify-between items-start">
76-
<h3 className="text-lg font-semibold text-gray-900">{title}</h3>
78+
<div>
79+
<h3 className="text-lg font-semibold text-gray-900">{title}</h3>
80+
{subtitle && <p className="text-sm text-gray-500 mt-1">{subtitle}</p>}
81+
</div>
7782
{action && <div className="ml-4">{action}</div>}
7883
</div>
7984
) : (

frontend/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,5 @@
3636
"include": [
3737
"**/*.ts",
3838
"**/*.tsx",
39-
"../api"
4039
]
4140
}

0 commit comments

Comments
 (0)