mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-05 00:28:27 +01:00
fix: Resolve additional TypeScript compilation errors - Fix walletData.lastUpdated undefined handling in analytics service - Fix isValidProfile import type vs runtime import issue - Fix generic type constraints and Map iteration in performance utils - Build now passes TypeScript compilation successfully
This commit is contained in:
1 parent
a0f978ea74
commit
ca4f0e91e0
3 files changed
+8
-8
No files matched your search
@@ -197,10 +197,10 @@ class AnalyticsService {
|
||||
isDemo: false,
|
||||
timeline: FEATURE_FLAGS.wallet.timeline,
|
||||
stats: {
|
||||
balance: this.createMetricValue(walletData.balance, 'api'),
|
||||
balance: this.createMetricValue(walletData.balance, 'api'),
|
||||
transactionCount: this.createMetricValue(walletData.transactions.length, 'api'),
|
||||
lastUpdated: this.createMetricValue(
|
||||
new Date(walletData.lastUpdated).toLocaleTimeString(),
|
||||
walletData.lastUpdated ? new Date(walletData.lastUpdated).toLocaleTimeString() : 'Unknown',
|
||||
'api'
|
||||
)
|
||||
}
|
||||
|
||||
@@ -15,10 +15,9 @@ import type {
|
||||
Profile,
|
||||
ProfileUpdateData,
|
||||
ProfileResponse,
|
||||
ProfileUpdateResponse,
|
||||
isValidProfile
|
||||
ProfileUpdateResponse
|
||||
} from '../types'
|
||||
import { isValidProfile as isValidProfileFromTypes } from '@/types/profile'
|
||||
import { isValidProfile } from '../types'
|
||||
|
||||
// ==================== PROFILE OPERATIONS ====================
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import React from 'react'
|
||||
/**
|
||||
* Enhanced lazy loading with error boundary and loading states
|
||||
*/
|
||||
export function createLazyComponent<T extends JSX.IntrinsicAttributes = {}>(
|
||||
export function createLazyComponent<T = any>(
|
||||
importFn: () => Promise<{ default: ComponentType<T> }>,
|
||||
fallback?: ComponentType
|
||||
) {
|
||||
@@ -29,7 +29,7 @@ export function createLazyComponent<T extends JSX.IntrinsicAttributes = {}>(
|
||||
return function LazyWrapper(props: T) {
|
||||
return (
|
||||
<Suspense fallback={fallback ? React.createElement(fallback) : <div>Loading...</div>}>
|
||||
<LazyComponent {...(props as T)} />
|
||||
<LazyComponent {...(props as any)} />
|
||||
</Suspense>
|
||||
)
|
||||
}
|
||||
@@ -118,7 +118,8 @@ export class PerformanceCache<T = any> {
|
||||
|
||||
clear(): void {
|
||||
if (this.onEvict) {
|
||||
for (const [key, entry] of this.cache) {
|
||||
const entries = Array.from(this.cache.entries())
|
||||
for (const [key, entry] of entries) {
|
||||
this.onEvict(key, entry.value)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user