tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
289
fork
atom
a tool for shared writing and social publishing
289
fork
atom
overview
issues
28
pulls
pipelines
tweak
awarm.space
3 months ago
8f26f13b
480e7bd7
+5
-6
1 changed file
expand all
collapse all
unified
split
components
Mention.tsx
+5
-6
components/Mention.tsx
···
1
1
"use client";
2
2
import { Agent } from "@atproto/api";
3
3
-
import { useState, useEffect } from "react";
3
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
169
-
const showHeader =
170
170
-
prevResult && prevResult.type !== result.type;
169
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
184
-
<>
183
183
+
<Fragment key={`header-publications`}>
185
184
<hr className="border-border-light mx-1 my-1" />
186
185
<div className={headerStyle}>Publications</div>
187
187
-
</>
186
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
227
-
${props.selected ? "bg-[var(--accent-light)]" : ""}`}
226
226
+
${props.selected ? "bg-[var(--accent-light)]!" : ""}`}
228
227
onClick={() => props.onClick()}
229
228
onMouseDown={(e) => props.onMouseDown(e)}
230
229
>