Keep a guest community logo on review and on the published rule.

Sign-in was clearing the staged file before it uploaded, and review only read the server URL, so a chosen logo disappeared after the upload step.
This commit is contained in:
adilallo committed 2026-11-05 20:02:40 -07:00
1 parent 2348a9e94f
commit 8212423ec3
19 files changed
+780 -61

No files matched your search

+5 -3
View File
@@ -163,14 +163,16 @@ export function RuleView({
// Render logo/icon
const renderLogo = () => {
if (logoUrl) {
// Check if it's a localhost URL or external URL that needs regular img tag
const isLocalhost =
// next/image cannot load blob previews or localhost optimizer targets.
const useNativeImage =
logoUrl.startsWith("blob:") ||
logoUrl.startsWith("data:") ||
logoUrl.startsWith("http://localhost") ||
logoUrl.startsWith("https://localhost");
const containerClass = `${logoContainerClass} relative overflow-hidden rounded-full bg-[var(--color-surface-invert-brand-teal)]`;
if (isLocalhost) {
if (useNativeImage) {
return (
<div className={containerClass}>
{/* eslint-disable-next-line @next/next/no-img-element */}