a tool for shared writing and social publishing

tweak

+5 -6
+5 -6
components/Mention.tsx
··· 1 1 "use client"; 2 2 import { Agent } from "@atproto/api"; 3 - import { useState, useEffect } from "react"; 3 + import { useState, useEffect, Fragment } from "react"; 4 4 import { createPortal } from "react-dom"; 5 5 import { useDebouncedEffect } from "src/hooks/useDebouncedEffect"; 6 6 import * as Popover from "@radix-ui/react-popover"; ··· 166 166 <ul className="list-none p-0 text-sm"> 167 167 {sortedSuggestions.map((result, index) => { 168 168 const prevResult = sortedSuggestions[index - 1]; 169 - const showHeader = 170 - prevResult && prevResult.type !== result.type; 169 + const showHeader = prevResult && prevResult.type !== result.type; 171 170 172 171 const [key, resultText, subtext] = 173 172 result.type === "did" ··· 181 180 return ( 182 181 <> 183 182 {showHeader && ( 184 - <> 183 + <Fragment key={`header-publications`}> 185 184 <hr className="border-border-light mx-1 my-1" /> 186 185 <div className={headerStyle}>Publications</div> 187 - </> 186 + </Fragment> 188 187 )} 189 188 <Result 190 189 key={key} ··· 224 223 menuItem flex-col! gap-0! 225 224 text-secondary leading-tight text-sm truncate 226 225 ${props.subtext ? "py-1!" : "py-2!"} 227 - ${props.selected ? "bg-[var(--accent-light)]" : ""}`} 226 + ${props.selected ? "bg-[var(--accent-light)]!" : ""}`} 228 227 onClick={() => props.onClick()} 229 228 onMouseDown={(e) => props.onMouseDown(e)} 230 229 >