about summary refs log tree commit diff
path: root/bskyembed/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'bskyembed/src/components')
-rw-r--r--bskyembed/src/components/container.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/bskyembed/src/components/container.tsx b/bskyembed/src/components/container.tsx
index a96addc8c..5b1b2b7fb 100644
--- a/bskyembed/src/components/container.tsx
+++ b/bskyembed/src/components/container.tsx
@@ -8,7 +8,7 @@ export function Container({
   href,
 }: {
   children: ComponentChildren
-  href: string
+  href?: string
 }) {
   const ref = useRef<HTMLDivElement>(null)
   const prevHeight = useRef(0)
@@ -39,7 +39,7 @@ export function Container({
       ref={ref}
       className="w-full bg-white hover:bg-neutral-50 relative transition-colors max-w-[600px] min-w-[300px] flex border rounded-xl"
       onClick={() => {
-        if (ref.current) {
+        if (ref.current && href) {
           // forwardRef requires preact/compat - let's keep it simple
           // to keep the bundle size down
           const anchor = ref.current.querySelector('a')
@@ -48,7 +48,7 @@ export function Container({
           }
         }
       }}>
-      <Link href={href} />
+      {href && <Link href={href} />}
       <div className="flex-1 px-4 pt-3 pb-2.5">{children}</div>
     </div>
   )