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
changed tags to use Link rather than button
cozylittle.house
4 months ago
72bc352b
257f28e4
+9
-22
5 changed files
expand all
collapse all
unified
split
app
lish
[did]
[publication]
[rkey]
Interactions
Interactions.tsx
page.tsx
components
Icons
TagTiny.tsx
InteractionsPreview.tsx
Tags.tsx
+1
-6
app/lish/[did]/[publication]/[rkey]/Interactions/Interactions.tsx
···
188
188
return (
189
189
<div className="flex gap-1 flex-wrap">
190
190
{Tags.map((tag, index) => (
191
191
-
<Tag
192
192
-
name={tag}
193
193
-
key={index}
194
194
-
onClick={() => {}}
195
195
-
className={props.className}
196
196
-
/>
191
191
+
<Tag name={tag} key={index} className={props.className} />
197
192
))}
198
193
</div>
199
194
);
+1
-1
app/lish/[did]/[publication]/page.tsx
···
151
151
</p>
152
152
</SpeedyLink>
153
153
154
154
-
<div className="text-sm text-tertiary flex gap-3 items-center justify-between pt-2">
154
154
+
<div className="text-sm text-tertiary flex gap-3 items-center justify-start pt-2">
155
155
<p className="text-sm text-tertiary ">
156
156
{doc_record.publishedAt &&
157
157
new Date(
+1
-1
components/Icons/TagTiny.tsx
···
11
11
{...props}
12
12
>
13
13
<path
14
14
-
d="M3.77874 8.14156C4.04754 8.07881 4.31714 8.24579 4.38005 8.51452C4.44271 8.78328 4.27495 9.05185 4.00625 9.11474C3.28447 9.28337 2.58798 9.82866 2.18022 10.4965C1.77055 11.1676 1.71549 11.8422 2.03769 12.3353C2.36996 12.8435 2.93354 13.1112 3.61236 13.2263C4.29074 13.3412 5.01376 13.29 5.55383 13.2237C6.54373 13.1021 7.25828 13.2476 7.69267 13.6328C8.15181 14.0403 8.18433 14.614 7.99959 15.0162C7.88416 15.2668 7.58704 15.3767 7.33628 15.2616C7.0857 15.1462 6.97585 14.849 7.09097 14.5982C7.11525 14.5452 7.11869 14.4601 7.02881 14.3804C6.91351 14.2784 6.55727 14.1072 5.67549 14.2155C5.10468 14.2856 4.26832 14.3513 3.44625 14.2121C2.6248 14.073 1.74646 13.7162 1.2011 12.882C0.590511 11.9475 0.802366 10.8346 1.32753 9.97447C1.85479 9.11128 2.76086 8.37934 3.77874 8.14156ZM14.0713 8.01372C14.3165 7.88693 14.6185 7.98357 14.7454 8.22876C14.8721 8.47385 14.7763 8.77506 14.5315 8.90204L8.24836 12.1523C7.79573 12.3863 7.28197 12.4771 6.77669 12.4112L3.48529 11.9816C3.2117 11.9458 3.0178 11.6945 3.05325 11.421C3.08899 11.1471 3.34091 10.9543 3.61473 10.99L6.90515 11.4195C7.20846 11.4591 7.51745 11.4046 7.78915 11.2641L14.0713 8.01372ZM11.2719 0.59284C11.7623 0.339077 12.3655 0.530621 12.6195 1.02086L15.0813 5.77601C15.3349 6.26628 15.1434 6.8696 14.6533 7.12355L7.65485 10.7462C7.37839 10.8894 7.06364 10.9431 6.75536 10.8997L3.94709 10.5035C3.53436 10.4452 3.17519 10.2676 2.89314 10.0144C3.08431 9.83482 3.29805 9.68223 3.5211 9.56452C3.83514 9.73322 4.22432 9.74989 4.56482 9.57371C5.11288 9.28982 5.32789 8.61462 5.04422 8.06644C4.76036 7.51832 4.08504 7.30434 3.53684 7.58801C3.29878 7.71132 3.12364 7.90842 3.02498 8.13672C2.74318 8.26557 2.47569 8.42747 2.22886 8.61485C2.21498 8.31747 2.26652 8.01049 2.39766 7.71408L3.6352 4.91811C3.77336 4.60615 4.0138 4.35055 4.31674 4.19359L11.2719 0.59284Z"
14
14
+
d="M3.70775 9.003C3.96622 8.90595 4.25516 9.03656 4.35228 9.29499C4.37448 9.35423 4.38309 9.41497 4.38255 9.47468C4.38208 9.6765 4.25946 9.86621 4.05931 9.94148C3.36545 10.2021 2.74535 10.833 2.42747 11.5479C2.33495 11.7561 2.27242 11.9608 2.239 12.1573C2.15817 12.6374 2.25357 13.069 2.52513 13.3858C2.92043 13.8467 3.51379 14.0403 4.20189 14.0665C4.88917 14.0925 5.59892 13.9482 6.12571 13.8126C7.09158 13.5639 7.81893 13.6157 8.29954 13.9415C8.67856 14.1986 8.83462 14.578 8.8347 14.9298C8.83502 15.0506 8.81652 15.1682 8.78294 15.2764C8.7009 15.5398 8.42049 15.6873 8.15696 15.6055C7.89935 15.5253 7.75386 15.2555 7.82396 14.9971C7.82572 14.9905 7.8258 14.9833 7.82786 14.9766C7.83167 14.9643 7.834 14.9503 7.8347 14.9356C7.83623 14.8847 7.8147 14.823 7.739 14.7716C7.61179 14.6853 7.23586 14.5616 6.37474 14.7833C5.81779 14.9266 4.99695 15.1 4.1638 15.0684C3.33126 15.0368 2.41412 14.7967 1.76536 14.0401C1.30175 13.4992 1.16206 12.8427 1.22728 12.1993C1.23863 12.086 1.25554 11.9732 1.27903 11.8614C1.28235 11.8457 1.28624 11.8302 1.28978 11.8145C1.34221 11.5817 1.41832 11.3539 1.51439 11.1378C1.92539 10.2136 2.72927 9.37064 3.70775 9.003ZM13.8972 7.54695C14.124 7.38948 14.4359 7.44622 14.5935 7.67292C14.7508 7.89954 14.6948 8.21063 14.4685 8.36823L8.65892 12.4044C8.24041 12.695 7.74265 12.8515 7.23314 12.8516H3.9138C3.63794 12.8515 3.41315 12.6274 3.41282 12.3516C3.41282 12.0755 3.63769 11.8517 3.9138 11.8516H7.23216C7.538 11.8516 7.8374 11.7575 8.0886 11.5831L13.8972 7.54695ZM10.1609 0.550851C10.6142 0.235853 11.2372 0.347685 11.5525 0.800851L14.6091 5.19734C14.9239 5.65063 14.8121 6.27369 14.3591 6.58894L7.88841 11.087C7.63297 11.2645 7.32837 11.3586 7.01732 11.3555L4.1804 11.3262C3.76371 11.3218 3.38443 11.1921 3.072 10.9776C3.23822 10.7748 3.43062 10.5959 3.63646 10.4503C3.96958 10.5767 4.35782 10.5421 4.67259 10.3233C5.17899 9.97084 5.30487 9.27438 4.95286 8.76765C4.60048 8.26108 3.90304 8.13639 3.39622 8.48835C3.17656 8.64127 3.02799 8.85895 2.9597 9.09773C2.69658 9.26211 2.45194 9.45783 2.23118 9.67585C2.17892 9.38285 2.19133 9.07163 2.28294 8.76081L3.14818 5.8282C3.24483 5.50092 3.45101 5.21639 3.73118 5.02155L10.1609 0.550851ZM8.76732 3.73835L9.73607 4.91023L8.68626 5.41804L7.79466 6.24323L7.04857 4.91804L6.26634 5.45417L7.22923 6.63386L5.72337 7.40437L6.34739 8.31355L7.60814 7.18464L8.37767 8.53132L9.15989 7.99421L8.17454 6.79792L9.27708 6.25788L10.1179 5.46589L10.8786 6.81452L11.6609 6.27741L10.6745 5.07917L12.1882 4.30476L11.5642 3.39558L10.2976 4.52839L9.54954 3.20124L8.76732 3.73835Z"
15
15
fill="currentColor"
16
16
/>
17
17
</svg>
+1
-6
components/InteractionsPreview.tsx
···
109
109
return (
110
110
<div className="flex gap-1 flex-wrap">
111
111
{Tags.map((tag, index) => (
112
112
-
<Tag
113
113
-
name={tag}
114
114
-
key={index}
115
115
-
onClick={() => {}}
116
116
-
className={props.className}
117
117
-
/>
112
112
+
<Tag name={tag} key={index} className={props.className} />
118
113
))}
119
114
</div>
120
115
);
+5
-8
components/Tags.tsx
···
3
3
import { Input } from "components/Input";
4
4
import { useState, useRef, useEffect } from "react";
5
5
import { Popover } from "components/Popover";
6
6
+
import Link from "next/link";
6
7
7
8
const Tags: { name: string; tagged: number }[] = [
8
9
{ name: "dogs", tagged: 240 },
···
19
20
name: string;
20
21
selected?: boolean;
21
22
onDelete?: (tag: string) => void;
22
22
-
onClick?: (tag: string) => void;
23
23
className?: string;
24
24
}) => {
25
25
return (
26
26
<div
27
27
className={`tag flex items-center text-xs rounded-md border ${props.selected ? "bg-accent-1 text-accent-2 border-accent-1 font-bold" : "bg-bg-page text-tertiary border-border"} ${props.className}`}
28
28
>
29
29
-
<button
30
30
-
type="button"
31
31
-
onClick={() => {
32
32
-
props.onClick ? props.onClick(props.name) : null;
33
33
-
}}
34
34
-
className={`px-1 py-0.5`}
29
29
+
<Link
30
30
+
href="/tag"
31
31
+
className={`px-1 py-0.5 text-tertiary hover:no-underline!`}
35
32
>
36
33
{props.name}{" "}
37
37
-
</button>
34
34
+
</Link>
38
35
{props.selected ? (
39
36
<button
40
37
type="button"