Skip to content

Commit 9c10d60

Browse files
authored
Merge pull request #32 from engmung/dev
fix: Final TS build fix using constant bypass for Web Component
2 parents bb89edb + 8c509c7 commit 9c10d60

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

web/src/components/sections/PatternPanel.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
import { useEffect, useState } from 'react';
2+
import React from 'react';
23
import ReactMarkdown from 'react-markdown';
34
import { SectionContent } from '@/lib/content';
45
import PretextText from '../ui/PretextText';
56
import Script from 'next/script';
67
import { useAppStore } from '@/store/useAppStore';
78

9+
// Type bypass for Web Component
10+
const EspWebInstallButton = 'esp-web-install-button' as any;
11+
812
interface PatternPanelProps {
913
content: SectionContent;
1014
}
@@ -85,15 +89,14 @@ export default function PatternPanel({ content }: PatternPanelProps) {
8589

8690
<div style={{ display: 'flex', flexWrap: 'wrap', gap: '1rem' }}>
8791
<div className="flash-item">
88-
{/* @ts-expect-error - esp-web-install-button is a custom element */}
89-
<esp-web-install-button manifest="/flash/manifest.json">
92+
<EspWebInstallButton manifest="/flash/manifest.json">
9093
<button slot="activate" className="btn-primary" style={{ padding: '0.75rem 1.5rem', background: '#000', color: '#fff', borderRadius: '4px', textDecoration: 'none', fontWeight: 500, cursor: 'pointer', border: 'none' }}>
9194
Flash Patternflow v1.1.0 (All Patterns)
9295
</button>
9396
<div slot="unsupported" style={{ marginTop: '0.5rem', fontSize: '12px', color: '#666' }}>
9497
Desktop Chrome/Edge only.
9598
</div>
96-
</esp-web-install-button>
99+
</EspWebInstallButton>
97100
</div>
98101
</div>
99102

0 commit comments

Comments
 (0)