Fix build errors: useCallback syntax and API module check

This commit is contained in:
defiQUG
2026-01-23 16:52:10 -08:00
parent 1ce376bc51
commit aa744e290c
2 changed files with 3 additions and 3 deletions

View File

@@ -78,8 +78,8 @@ app.use((err: Error, req: Request, res: Response, next: NextFunction) => {
});
});
// Start server
if (require.main === module) {
// Start server (only if running directly, not when imported)
if (typeof require !== 'undefined' && require.main === module) {
app.listen(PORT, () => {
logger.info(`API server started on port ${PORT}`);
});

View File

@@ -35,7 +35,7 @@ export default function TransactionsPage() {
const converter = getDefaultConverter();
const handleSubmit = async (e: React.FormEvent) => {
const handleSubmit = useCallback(async (e: React.FormEvent) => {
e.preventDefault();
setErrors({});
setIsProcessing(true);