fix: resolve eslint issues
This commit is contained in:
parent
5d8cab3916
commit
ba16745daa
@ -37,7 +37,7 @@ export default async function DocsHome() {
|
||||
<div className="flex h-64 flex-col items-center justify-center rounded-lg border border-dashed border-surface-border bg-surface p-8 text-center">
|
||||
<h3 className="text-lg font-semibold text-heading">No Documentation Found</h3>
|
||||
<p className="max-w-md text-sm text-text-muted mt-2">
|
||||
We couldn't find any documentation files. Please ensure content is synced to <code>src/content/doc</code>.
|
||||
We could not find any documentation files. Please ensure content is synced to <code>src/content/doc</code>.
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* eslint-disable @next/next/no-page-custom-font */
|
||||
|
||||
export const dynamic = 'error'
|
||||
|
||||
import './globals.css'
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
'use client'
|
||||
|
||||
import { useMemo, useState } from 'react'
|
||||
import Image from 'next/image'
|
||||
|
||||
import type { BillingPaymentMethod } from '@modules/products/registry'
|
||||
|
||||
@ -97,7 +98,7 @@ export default function CryptoBillingWidget({
|
||||
|
||||
{qrCode ? (
|
||||
<div className="mt-3 rounded-lg bg-white p-3">
|
||||
<img src={qrCode} alt={`${label} QR`} className="mx-auto h-36 w-36 object-contain" />
|
||||
<Image src={qrCode} alt={`${label} QR`} width={144} height={144} className="mx-auto h-36 w-36 object-contain" unoptimized />
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
'use client'
|
||||
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react'
|
||||
import Image from 'next/image'
|
||||
|
||||
import { PayPalPayGoButton, PayPalSubscriptionButton } from '@components/billing/PayPalButtons'
|
||||
import { resolveBillingClientId } from '@components/billing/utils'
|
||||
@ -111,10 +112,6 @@ export default function BillingOptionsPanel() {
|
||||
}
|
||||
}, [])
|
||||
|
||||
if (!products.length) {
|
||||
return null
|
||||
}
|
||||
|
||||
const activeMethods = useMemo(() => {
|
||||
if (!selected?.plan.paymentMethods) return []
|
||||
const order: BillingPaymentMethod['type'][] = ['paypal', 'ethereum', 'usdt']
|
||||
@ -149,6 +146,10 @@ export default function BillingOptionsPanel() {
|
||||
[handleSync, selected],
|
||||
)
|
||||
|
||||
if (!products.length) {
|
||||
return null
|
||||
}
|
||||
|
||||
const renderCryptoCard = (method: BillingPaymentMethod) => {
|
||||
const address = method.address?.trim()
|
||||
const network = method.network?.trim()
|
||||
@ -164,7 +165,14 @@ export default function BillingOptionsPanel() {
|
||||
|
||||
{qrCode ? (
|
||||
<div className="rounded-xl bg-white p-4 text-center">
|
||||
<img src={qrCode} alt={`${method.label || method.type} QR`} className={qrClassName} />
|
||||
<Image
|
||||
src={qrCode}
|
||||
alt={`${method.label || method.type} QR`}
|
||||
width={224}
|
||||
height={224}
|
||||
className={qrClassName}
|
||||
unoptimized
|
||||
/>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
@ -219,7 +227,7 @@ export default function BillingOptionsPanel() {
|
||||
|
||||
{method.qrCode ? (
|
||||
<div className="rounded-xl bg-white p-4 text-center">
|
||||
<img src={method.qrCode} alt="PayPal QR" className={qrClassName} />
|
||||
<Image src={method.qrCode} alt="PayPal QR" width={224} height={224} className={qrClassName} unoptimized />
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
'use client'
|
||||
|
||||
import { useCallback, useMemo, useState } from 'react'
|
||||
import Image from 'next/image'
|
||||
import useSWR from 'swr'
|
||||
|
||||
import Card from '../components/Card'
|
||||
@ -163,10 +164,13 @@ export default function SubscriptionPanel() {
|
||||
</dl>
|
||||
{record.paymentQr ? (
|
||||
<div className="mt-3 rounded-lg bg-white p-3">
|
||||
<img
|
||||
<Image
|
||||
src={record.paymentQr}
|
||||
alt={`QR for ${record.externalId}`}
|
||||
width={112}
|
||||
height={112}
|
||||
className="mx-auto h-28 w-28 object-contain"
|
||||
unoptimized
|
||||
/>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
@ -114,8 +114,8 @@ function createRegistry(): ExtensionRegistry {
|
||||
if (!route.enabled) {
|
||||
throw new Error(`Extension route is disabled: ${path}`)
|
||||
}
|
||||
const module = await route.loader()
|
||||
return module.default
|
||||
const loadedModule = await route.loader()
|
||||
return loadedModule.default
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -118,7 +118,6 @@ function filesystemTemplateLoader(name: string): TemplateDefinition | null {
|
||||
|
||||
function loadTemplateModule(modulePath: string): TemplateDefinition | null {
|
||||
try {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const mod = require(modulePath)
|
||||
const template = (mod?.default ?? mod) as TemplateDefinition | undefined
|
||||
if (!template || typeof template !== 'object') {
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import typography from '@tailwindcss/typography'
|
||||
|
||||
export default {
|
||||
const tailwindConfig = {
|
||||
// 扫描的源文件路径
|
||||
content: [
|
||||
'./src/**/*.{js,ts,jsx,tsx,mdx}',
|
||||
@ -81,3 +81,5 @@ export default {
|
||||
typography,
|
||||
],
|
||||
}
|
||||
|
||||
export default tailwindConfig
|
||||
|
||||
Loading…
Reference in New Issue
Block a user