Skip to content

Commit 7b83d07

Browse files
Merge pull request #30 from developerfred/fix-build
Fix build
2 parents d58ab2d + 560c4f4 commit 7b83d07

File tree

5 files changed

+20
-15
lines changed

5 files changed

+20
-15
lines changed

.papi/metadata/paseo.scale

0 Bytes
Binary file not shown.

src/components/blockchain/components/TransactionBuilder.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -600,9 +600,9 @@ const TransactionBuilder: React.FC<TransactionBuilderEnhancedProps> = ({
600600
}
601601
}, [state.builtTx, api, senderAccount.address, updateState, walletReady, walletConnector]);
602602

603-
// Enhanced layout classes based on phase
603+
604604
const containerClasses = useMemo(() => {
605-
const base = "modal-index-export transition-all duration-300 ease-in-out";
605+
const base = " transition-all duration-300 ease-in-out";
606606

607607
if (isFullscreen || isExpanded) {
608608
return `${base} fixed inset-4 z-50 max-h-[calc(100vh-2rem)] overflow-y-auto`;
@@ -612,7 +612,7 @@ const TransactionBuilder: React.FC<TransactionBuilderEnhancedProps> = ({
612612
}, [isFullscreen, isExpanded]);
613613

614614
const cardClasses = useMemo(() => {
615-
const base = "modal-index-export relative transition-all duration-300 ease-in-out";
615+
const base = "relative transition-all duration-300 ease-in-out";
616616

617617
if (isExpanded) {
618618
return `${base} p-6 shadow-2xl border-2 border-blue-200 bg-white/95 backdrop-blur-sm`;

src/lib/export-modal/ExportModal.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ const FallbackOptionsTab: React.FC<any> = ({
105105
onExport,
106106
isExporting,
107107
exportError,
108-
getColor
108+
getColor,
109+
getNetworkColor
109110
}) => (
110111
<div className="space-y-6">
111112
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
@@ -183,7 +184,7 @@ const FallbackOptionsTab: React.FC<any> = ({
183184
</div>
184185
);
185186

186-
// Fallback Preview Tab Component
187+
187188
const FallbackPreviewTab: React.FC<any> = ({ exportedComponent, metrics }) => (
188189
<div className="space-y-6">
189190
<div className="grid grid-cols-1 md:grid-cols-4 gap-4">
@@ -218,7 +219,7 @@ const FallbackPreviewTab: React.FC<any> = ({ exportedComponent, metrics }) => (
218219
</div>
219220
);
220221

221-
// Fallback Download Tab Component
222+
222223
const FallbackDownloadTab: React.FC<any> = ({ exportedComponent, options, onDownloadAll }) => (
223224
<div className="space-y-6">
224225
<div className="text-center">
@@ -282,7 +283,7 @@ export const ExportModal: React.FC<ExportModalProps> = React.memo(({
282283
const [exportError, setExportError] = useState<string>('');
283284
const [activeTab, setActiveTab] = useState<TabType>('options');
284285

285-
// Reset state when modal opens/closes
286+
286287
useEffect(() => {
287288
if (isOpen) {
288289
setExportedComponent(null);
@@ -400,6 +401,7 @@ export const ExportModal: React.FC<ExportModalProps> = React.memo(({
400401
return (
401402
<>
402403
{/* Overlay */}
404+
{/* biome-ignore lint/a11y/useKeyWithClickEvents: <explanation> */}
403405
<div
404406
className="modal-index-export fixed inset-0 bg-black/50 dark:bg-black/80 backdrop-blur-sm z-[200] flex items-center justify-center p-4 animate-in fade-in-0 duration-200"
405407
onClick={handleOverlayClick}
@@ -484,6 +486,7 @@ export const ExportModal: React.FC<ExportModalProps> = React.memo(({
484486
isExporting={isExporting}
485487
exportError={exportError}
486488
getColor={getColor}
489+
getNetworkColor={getNetworkColor}
487490
/>
488491
)}
489492

src/lib/export-modal/tabs/OptionsTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// @ts-nocheck
33
import type React from 'react';
44
import type { TabProps } from '../types';
5-
import { useTheme } from '@/lib/hooks/useTheme';
5+
import { useThemeHook } from '@/lib/hooks/useTheme';
66

77
export const OptionsTab: React.FC<TabProps> = ({
88
options,

src/lib/hooks/useTheme.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ export function useThemeHook() {
99
const themeContext = useContext(ThemeContext);
1010

1111

12-
const [additionalColors, setAdditionalColors] = useState<Record<string, string>>({});
13-
14-
1512
const {
1613
isDarkTheme = false,
1714
toggleTheme = () => { },
@@ -53,22 +50,27 @@ export function useThemeHook() {
5350

5451

5552
const hexToRgba = useCallback((hex: string, opacity: number): string => {
53+
if (!hex || typeof hex !== 'string') return `rgba(0, 0, 0, ${opacity})`;
5654
hex = hex.replace('#', '');
55+
56+
if (![3, 6].includes(hex.length)) return `rgba(0, 0, 0, ${opacity})`;
57+
5758
let r = 0, g = 0, b = 0;
5859

5960
if (hex.length === 3) {
6061
r = parseInt(hex[0] + hex[0], 16);
6162
g = parseInt(hex[1] + hex[1], 16);
6263
b = parseInt(hex[2] + hex[2], 16);
6364
} else if (hex.length === 6) {
64-
r = parseInt(hex.substr(0, 2), 16);
65-
g = parseInt(hex.substr(2, 2), 16);
66-
b = parseInt(hex.substr(4, 2), 16);
65+
r = parseInt(hex.substring(0, 2), 16);
66+
g = parseInt(hex.substring(2, 4), 16);
67+
b = parseInt(hex.substring(4, 6), 16);
6768
}
6869

6970
return `rgba(${r}, ${g}, ${b}, ${opacity})`;
7071
}, []);
7172

73+
7274

7375
const getCustomColor = useCallback((colorName: string, opacity: number = 1): string => {
7476
if (typeof window === "undefined") return '#000000';
@@ -84,7 +86,7 @@ export function useThemeHook() {
8486
return hexToRgba(colorValue, opacity);
8587
}, [hexToRgba]);
8688

87-
// Função para obter cores de rede com opacity
89+
8890
const getNetworkColorWithOpacity = useCallback((
8991
colorType: 'primary' | 'secondary' | 'light' | 'dark' = 'primary',
9092
opacity: number = 1

0 commit comments

Comments
 (0)