Archived
Fix frontend lint: links, unused code, quotes, img elements
- Internal links use next/link instead of <a> (no full page reload). - Remove dead code: RegisterForm's unreachable Yoco checkout branch, the unused AttendeeForms on the registration success page, unused Geist fonts, and assorted unused variables and catch bindings. - Escape quotes in JSX text; replace @ts-ignore in apiFetch with a cast. - Keep the intentional raw <img> elements (data URLs, runtime API host) with a documented lint exception; the event editor uses ApiImage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -34,5 +34,8 @@ export function ApiImage({ src, alt = "", className, style }: Props) {
|
||||
// and then jump once resolved — same class of flash as an unauthenticated nav link showing too early.
|
||||
if (!resolved) return <div className={`${className || ""} bg-gray-100 animate-pulse`} style={style} aria-hidden="true" />;
|
||||
|
||||
// A plain <img>: the API host is only known at runtime and the images have no fixed size,
|
||||
// so next/image's optimizer (which needs both up front) doesn't fit here.
|
||||
// eslint-disable-next-line @next/next/no-img-element
|
||||
return <img src={resolved} alt={alt} className={className} style={style} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user