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
29
pulls
pipelines
moved around some stuff for our navigation
cozylittle.house
1 month ago
760c1d8a
ea44877f
+287
-228
12 changed files
expand all
collapse all
unified
split
app
(home-pages)
p
[didOrHandle]
layout.tsx
components
ActionBar
ActionButton.tsx
DesktopNavigation.tsx
Footer.tsx
MobileNavigation.tsx
Navigation.tsx
NavigationButtons.tsx
Publications.tsx
Icons
NotificationSmall.tsx
TagSmall.tsx
PageLayouts
DashboardLayout.tsx
src
utils
getRecordFromDid.ts
+1
app/(home-pages)/p/[didOrHandle]/layout.tsx
···
82
82
id="profile"
83
83
defaultTab="default"
84
84
currentPage="profile"
85
85
+
profileDid={did}
85
86
actions={null}
86
87
tabs={{
87
88
default: {
+1
-1
components/ActionBar/ActionButton.tsx
···
55
55
rounded-md border
56
56
flex gap-2 items-start sm:justify-start justify-center
57
57
p-1 sm:mx-0
58
58
-
${showLabelOnMobile && !secondary ? "w-full" : "sm:w-full w-max"}
58
58
+
${showLabelOnMobile && "sm:w-full w-max"}
59
59
${
60
60
primary
61
61
? "bg-accent-1 border-accent-1 text-accent-2 transparent-outline sm:hover:outline-accent-contrast focus:outline-accent-1 outline-offset-1 mx-1 first:ml-0"
+42
components/ActionBar/DesktopNavigation.tsx
···
1
1
+
import { useIdentityData } from "components/IdentityProvider";
2
2
+
import {
3
3
+
navPages,
4
4
+
HomeButton,
5
5
+
ReaderButton,
6
6
+
NotificationButton,
7
7
+
} from "./NavigationButtons";
8
8
+
import { PublicationButtons } from "./Publications";
9
9
+
import { Sidebar } from "./Sidebar";
10
10
+
11
11
+
export const DesktopNavigation = (props: {
12
12
+
currentPage: navPages;
13
13
+
publication?: string;
14
14
+
}) => {
15
15
+
let { identity } = useIdentityData();
16
16
+
let thisPublication = identity?.publications?.find(
17
17
+
(pub) => pub.uri === props.publication,
18
18
+
);
19
19
+
return (
20
20
+
<div className="flex flex-col gap-3">
21
21
+
<Sidebar alwaysOpen>
22
22
+
<HomeButton current={props.currentPage === "home"} />
23
23
+
<ReaderButton
24
24
+
current={props.currentPage === "reader"}
25
25
+
subs={
26
26
+
identity?.publication_subscriptions?.length !== 0 &&
27
27
+
identity?.publication_subscriptions?.length !== undefined
28
28
+
}
29
29
+
/>
30
30
+
{identity?.atp_did && (
31
31
+
<NotificationButton current={props.currentPage === "notifications"} />
32
32
+
)}
33
33
+
</Sidebar>
34
34
+
<Sidebar alwaysOpen>
35
35
+
<PublicationButtons
36
36
+
currentPage={props.currentPage}
37
37
+
currentPubUri={thisPublication?.uri}
38
38
+
/>
39
39
+
</Sidebar>
40
40
+
</div>
41
41
+
);
42
42
+
};
+1
-1
components/ActionBar/Footer.tsx
···
8
8
actionFooter touch-none shrink-0
9
9
w-full z-10
10
10
px-2 pt-1 pwa-padding-bottom
11
11
-
flex justify-start gap-1
11
11
+
flex justify-between gap-1
12
12
h-[calc(38px+var(--safe-padding-bottom))]
13
13
bg-[rgba(var(--bg-page),0.5)] border-top border-bg-page`}
14
14
>
+129
components/ActionBar/MobileNavigation.tsx
···
1
1
+
import { MenuSmall } from "components/Icons/MenuSmall";
2
2
+
import { useIdentityData } from "components/IdentityProvider";
3
3
+
import { Popover } from "components/Popover";
4
4
+
import { Separator } from "components/Layout";
5
5
+
import {
6
6
+
HomeButton,
7
7
+
navPages,
8
8
+
NotificationButton,
9
9
+
ReaderButton,
10
10
+
} from "./NavigationButtons";
11
11
+
import { PubIcon, PublicationButtons } from "./Publications";
12
12
+
import { HomeSmall } from "components/Icons/HomeSmall";
13
13
+
import { ReaderReadSmall } from "components/Icons/ReaderSmall";
14
14
+
import { LooseLeafSmall } from "components/Icons/LooseleafSmall";
15
15
+
import { normalizePublicationRecord } from "src/utils/normalizeRecords";
16
16
+
import {
17
17
+
NotificationsReadSmall,
18
18
+
NotificationsUnreadSmall,
19
19
+
} from "components/Icons/NotificationSmall";
20
20
+
import { TagSmall } from "components/Icons/TagSmall";
21
21
+
import { Avatar } from "components/Avatar";
22
22
+
import { useProfileFromDid } from "src/utils/getRecordFromDid";
23
23
+
24
24
+
export const MobileNavigation = (props: {
25
25
+
currentPage: navPages;
26
26
+
currentPublicationUri?: string;
27
27
+
currentProfileDid?: string;
28
28
+
}) => {
29
29
+
let { identity } = useIdentityData();
30
30
+
let thisPublication = identity?.publications?.find(
31
31
+
(pub) => pub.uri === props.currentPublicationUri,
32
32
+
);
33
33
+
return (
34
34
+
<div className="mobileNav flex gap-1 items-center text-secondary ">
35
35
+
<Popover
36
36
+
onOpenAutoFocus={(e) => e.preventDefault()}
37
37
+
asChild
38
38
+
className="px-2! !max-w-[256px]"
39
39
+
trigger={
40
40
+
<div className="shrink-0 p-1 h-full flex gap-1 font-bold items-center text-secondary">
41
41
+
<MenuSmall />
42
42
+
43
43
+
<CurrentPageIcon
44
44
+
currentPage={props.currentPage}
45
45
+
currentPubUri={thisPublication?.uri}
46
46
+
currentProfileDid={props.currentProfileDid}
47
47
+
/>
48
48
+
</div>
49
49
+
}
50
50
+
>
51
51
+
<HomeButton current={props.currentPage === "home"} />
52
52
+
<ReaderButton
53
53
+
current={props.currentPage === "reader"}
54
54
+
subs={
55
55
+
identity?.publication_subscriptions?.length !== 0 &&
56
56
+
identity?.publication_subscriptions?.length !== undefined
57
57
+
}
58
58
+
/>
59
59
+
<hr className="my-1 border-border-light" />
60
60
+
<PublicationButtons
61
61
+
currentPage={props.currentPage}
62
62
+
currentPubUri={thisPublication?.uri}
63
63
+
/>
64
64
+
</Popover>
65
65
+
{identity?.atp_did && (
66
66
+
<>
67
67
+
<Separator classname="h-6!" />
68
68
+
<NotificationButton />
69
69
+
</>
70
70
+
)}
71
71
+
</div>
72
72
+
);
73
73
+
};
74
74
+
75
75
+
const CurrentPageIcon = (props: {
76
76
+
currentPage: navPages;
77
77
+
currentPubUri?: string;
78
78
+
currentProfileDid?: string;
79
79
+
}) => {
80
80
+
let { identity } = useIdentityData();
81
81
+
let currentPub = identity?.publications?.find(
82
82
+
(pub) => pub.uri === props.currentPubUri,
83
83
+
);
84
84
+
let pubRecord = currentPub
85
85
+
? normalizePublicationRecord(currentPub.record)
86
86
+
: null;
87
87
+
let unreads = identity?.notifications[0]?.count;
88
88
+
89
89
+
const { data: profile } = useProfileFromDid(
90
90
+
props.currentPage === "profile" ? props.currentProfileDid : undefined,
91
91
+
);
92
92
+
93
93
+
switch (props.currentPage) {
94
94
+
case "home":
95
95
+
return <HomeSmall />;
96
96
+
case "reader":
97
97
+
return <ReaderReadSmall />;
98
98
+
case "profile":
99
99
+
if (profile) {
100
100
+
return (
101
101
+
<Avatar
102
102
+
src={profile.avatar}
103
103
+
displayName={profile.displayName}
104
104
+
size="medium"
105
105
+
/>
106
106
+
);
107
107
+
}
108
108
+
return <LooseLeafSmall />;
109
109
+
case "tag":
110
110
+
return <TagSmall />;
111
111
+
case "notifications":
112
112
+
if (unreads) {
113
113
+
return <NotificationsUnreadSmall className="text-accent-contrast" />;
114
114
+
} else {
115
115
+
return <NotificationsReadSmall />;
116
116
+
}
117
117
+
118
118
+
case "looseleafs":
119
119
+
return <LooseLeafSmall />;
120
120
+
121
121
+
case "pub":
122
122
+
if (currentPub && pubRecord) {
123
123
+
return <PubIcon record={pubRecord} uri={currentPub.uri} />;
124
124
+
}
125
125
+
return null;
126
126
+
default:
127
127
+
return null;
128
128
+
}
129
129
+
};
-179
components/ActionBar/Navigation.tsx
···
1
1
-
import { HomeSmall } from "components/Icons/HomeSmall";
2
2
-
import { ActionButton } from "./ActionButton";
3
3
-
import { Sidebar } from "./Sidebar";
4
4
-
import { useIdentityData } from "components/IdentityProvider";
5
5
-
import Link from "next/link";
6
6
-
import { DiscoverSmall } from "components/Icons/DiscoverSmall";
7
7
-
import { PublicationButtons } from "./Publications";
8
8
-
import { Popover } from "components/Popover";
9
9
-
import { MenuSmall } from "components/Icons/MenuSmall";
10
10
-
import {
11
11
-
ReaderReadSmall,
12
12
-
ReaderUnreadSmall,
13
13
-
} from "components/Icons/ReaderSmall";
14
14
-
import {
15
15
-
NotificationsReadSmall,
16
16
-
NotificationsUnreadSmall,
17
17
-
} from "components/Icons/NotificationSmall";
18
18
-
import { SpeedyLink } from "components/SpeedyLink";
19
19
-
import { Separator } from "components/Layout";
20
20
-
21
21
-
export type navPages =
22
22
-
| "home"
23
23
-
| "reader"
24
24
-
| "pub"
25
25
-
| "discover"
26
26
-
| "notifications"
27
27
-
| "looseleafs"
28
28
-
| "tag"
29
29
-
| "profile";
30
30
-
31
31
-
export const DesktopNavigation = (props: {
32
32
-
currentPage: navPages;
33
33
-
publication?: string;
34
34
-
}) => {
35
35
-
let { identity } = useIdentityData();
36
36
-
return (
37
37
-
<div className="flex flex-col gap-3">
38
38
-
<Sidebar alwaysOpen>
39
39
-
<NavigationOptions
40
40
-
currentPage={props.currentPage}
41
41
-
publication={props.publication}
42
42
-
/>
43
43
-
</Sidebar>
44
44
-
{identity?.atp_did && (
45
45
-
<Sidebar alwaysOpen>
46
46
-
<NotificationButton current={props.currentPage === "notifications"} />
47
47
-
</Sidebar>
48
48
-
)}
49
49
-
</div>
50
50
-
);
51
51
-
};
52
52
-
53
53
-
export const MobileNavigation = (props: {
54
54
-
currentPage: navPages;
55
55
-
publication?: string;
56
56
-
}) => {
57
57
-
let { identity } = useIdentityData();
58
58
-
59
59
-
return (
60
60
-
<div className="flex gap-1 ">
61
61
-
<Popover
62
62
-
onOpenAutoFocus={(e) => e.preventDefault()}
63
63
-
asChild
64
64
-
className="px-2! !max-w-[256px]"
65
65
-
trigger={
66
66
-
<div className="shrink-0 p-1 text-accent-contrast h-full flex gap-2 font-bold items-center">
67
67
-
<MenuSmall />
68
68
-
</div>
69
69
-
}
70
70
-
>
71
71
-
<NavigationOptions
72
72
-
currentPage={props.currentPage}
73
73
-
publication={props.publication}
74
74
-
isMobile
75
75
-
/>
76
76
-
</Popover>
77
77
-
{identity?.atp_did && (
78
78
-
<>
79
79
-
<Separator />
80
80
-
<NotificationButton />
81
81
-
</>
82
82
-
)}
83
83
-
</div>
84
84
-
);
85
85
-
};
86
86
-
87
87
-
const NavigationOptions = (props: {
88
88
-
currentPage: navPages;
89
89
-
publication?: string;
90
90
-
isMobile?: boolean;
91
91
-
}) => {
92
92
-
let { identity } = useIdentityData();
93
93
-
let thisPublication = identity?.publications?.find(
94
94
-
(pub) => pub.uri === props.publication,
95
95
-
);
96
96
-
return (
97
97
-
<>
98
98
-
<HomeButton current={props.currentPage === "home"} />
99
99
-
<ReaderButton
100
100
-
current={props.currentPage === "reader"}
101
101
-
subs={
102
102
-
identity?.publication_subscriptions?.length !== 0 &&
103
103
-
identity?.publication_subscriptions?.length !== undefined
104
104
-
}
105
105
-
/>
106
106
-
<DiscoverButton current={props.currentPage === "discover"} />
107
107
-
108
108
-
<hr className="border-border-light my-1" />
109
109
-
<PublicationButtons
110
110
-
currentPage={props.currentPage}
111
111
-
currentPubUri={thisPublication?.uri}
112
112
-
/>
113
113
-
</>
114
114
-
);
115
115
-
};
116
116
-
117
117
-
const HomeButton = (props: { current?: boolean }) => {
118
118
-
return (
119
119
-
<SpeedyLink href={"/home"} className="hover:!no-underline">
120
120
-
<ActionButton
121
121
-
nav
122
122
-
icon={<HomeSmall />}
123
123
-
label="Home"
124
124
-
className={props.current ? "bg-bg-page! border-border-light!" : ""}
125
125
-
/>
126
126
-
</SpeedyLink>
127
127
-
);
128
128
-
};
129
129
-
130
130
-
const ReaderButton = (props: { current?: boolean; subs: boolean }) => {
131
131
-
if (!props.subs) return;
132
132
-
return (
133
133
-
<SpeedyLink href={"/reader"} className="hover:no-underline!">
134
134
-
<ActionButton
135
135
-
nav
136
136
-
icon={<ReaderUnreadSmall />}
137
137
-
label="Reader"
138
138
-
className={props.current ? "bg-bg-page! border-border-light!" : ""}
139
139
-
/>
140
140
-
</SpeedyLink>
141
141
-
);
142
142
-
};
143
143
-
144
144
-
const DiscoverButton = (props: { current?: boolean }) => {
145
145
-
return (
146
146
-
<Link href={"/discover"} className="hover:no-underline!">
147
147
-
<ActionButton
148
148
-
nav
149
149
-
icon={<DiscoverSmall />}
150
150
-
label="Discover"
151
151
-
subtext=""
152
152
-
className={props.current ? "bg-bg-page! border-border-light!" : ""}
153
153
-
/>
154
154
-
</Link>
155
155
-
);
156
156
-
};
157
157
-
158
158
-
export function NotificationButton(props: { current?: boolean }) {
159
159
-
let { identity } = useIdentityData();
160
160
-
let unreads = identity?.notifications[0]?.count;
161
161
-
162
162
-
return (
163
163
-
<SpeedyLink href={"/notifications"} className="hover:no-underline!">
164
164
-
<ActionButton
165
165
-
nav
166
166
-
labelOnMobile={false}
167
167
-
icon={
168
168
-
unreads ? (
169
169
-
<NotificationsUnreadSmall className="text-accent-contrast" />
170
170
-
) : (
171
171
-
<NotificationsReadSmall />
172
172
-
)
173
173
-
}
174
174
-
label="Notifications"
175
175
-
className={`${props.current ? "bg-bg-page! border-border-light!" : ""} ${unreads ? "text-accent-contrast!" : ""}`}
176
176
-
/>
177
177
-
</SpeedyLink>
178
178
-
);
179
179
-
}
+71
components/ActionBar/NavigationButtons.tsx
···
1
1
+
import { HomeSmall } from "components/Icons/HomeSmall";
2
2
+
import { ActionButton } from "./ActionButton";
3
3
+
import { useIdentityData } from "components/IdentityProvider";
4
4
+
import Link from "next/link";
5
5
+
import { DiscoverSmall } from "components/Icons/DiscoverSmall";
6
6
+
import { PublicationButtons } from "./Publications";
7
7
+
import { ReaderUnreadSmall } from "components/Icons/ReaderSmall";
8
8
+
import {
9
9
+
NotificationsReadSmall,
10
10
+
NotificationsUnreadSmall,
11
11
+
} from "components/Icons/NotificationSmall";
12
12
+
import { SpeedyLink } from "components/SpeedyLink";
13
13
+
14
14
+
export type navPages =
15
15
+
| "home"
16
16
+
| "reader"
17
17
+
| "pub"
18
18
+
| "notifications"
19
19
+
| "looseleafs"
20
20
+
| "tag"
21
21
+
| "profile";
22
22
+
23
23
+
export const HomeButton = (props: { current?: boolean }) => {
24
24
+
return (
25
25
+
<SpeedyLink href={"/home"} className="hover:!no-underline">
26
26
+
<ActionButton
27
27
+
nav
28
28
+
icon={<HomeSmall />}
29
29
+
label="Home"
30
30
+
className={props.current ? "bg-bg-page! border-border-light!" : ""}
31
31
+
/>
32
32
+
</SpeedyLink>
33
33
+
);
34
34
+
};
35
35
+
36
36
+
export const ReaderButton = (props: { current?: boolean; subs: boolean }) => {
37
37
+
if (!props.subs) return;
38
38
+
return (
39
39
+
<SpeedyLink href={"/reader"} className="hover:no-underline!">
40
40
+
<ActionButton
41
41
+
nav
42
42
+
icon={<ReaderUnreadSmall />}
43
43
+
label="Reader"
44
44
+
className={props.current ? "bg-bg-page! border-border-light!" : ""}
45
45
+
/>
46
46
+
</SpeedyLink>
47
47
+
);
48
48
+
};
49
49
+
50
50
+
export function NotificationButton(props: { current?: boolean }) {
51
51
+
let { identity } = useIdentityData();
52
52
+
let unreads = identity?.notifications[0]?.count;
53
53
+
54
54
+
return (
55
55
+
<SpeedyLink href={"/notifications"} className="hover:no-underline!">
56
56
+
<ActionButton
57
57
+
nav
58
58
+
labelOnMobile={false}
59
59
+
icon={
60
60
+
unreads ? (
61
61
+
<NotificationsUnreadSmall className="text-accent-contrast" />
62
62
+
) : (
63
63
+
<NotificationsReadSmall />
64
64
+
)
65
65
+
}
66
66
+
label="Notifications"
67
67
+
className={`${props.current ? "bg-bg-page! border-border-light!" : ""} ${unreads ? "text-accent-contrast!" : ""}`}
68
68
+
/>
69
69
+
</SpeedyLink>
70
70
+
);
71
71
+
}
+2
-3
components/ActionBar/Publications.tsx
···
19
19
import { useIsMobile } from "src/hooks/isMobile";
20
20
import { useState } from "react";
21
21
import { LooseLeafSmall } from "components/Icons/LooseleafSmall";
22
22
-
import { navPages } from "./Navigation";
22
22
+
import { navPages } from "./NavigationButtons";
23
23
24
24
export const PublicationButtons = (props: {
25
25
currentPage: navPages;
···
38
38
return <PubListEmpty />;
39
39
40
40
return (
41
41
-
<div className="pubListWrapper w-full flex flex-col gap-1 sm:bg-transparent sm:border-0">
41
41
+
<div className="pubListWrapper w-full flex flex-col sm:bg-transparent sm:border-0">
42
42
{hasLooseleafs && (
43
43
<>
44
44
<SpeedyLink
···
58
58
}
59
59
/>
60
60
</SpeedyLink>
61
61
-
<hr className="border-border-light border-dashed mx-1" />
62
61
</>
63
62
)}
64
63
+1
-36
components/Icons/NotificationSmall.tsx
···
26
26
viewBox="0 0 24 24"
27
27
fill="none"
28
28
xmlns="http://www.w3.org/2000/svg"
29
29
-
>
30
30
-
<path
31
31
-
d="M12.3779 0.890636C13.5297 0.868361 14.2312 1.35069 14.6104 1.8047C15.1942 2.50387 15.2636 3.34086 15.2129 3.95314C17.7074 4.96061 18.8531 7.45818 19.375 10.3975C19.5903 11.1929 20.0262 11.5635 20.585 11.9336C21.1502 12.3079 22.0847 12.7839 22.5879 13.7998C23.4577 15.556 22.8886 17.8555 20.9297 19.083C20.1439 19.5754 19.2029 20.1471 17.8496 20.5869C17.1962 20.7993 16.454 20.9768 15.5928 21.1055C15.2068 22.4811 13.9287 23.4821 12.4238 23.4824C10.9225 23.4824 9.64464 22.4867 9.25489 21.1162C8.37384 20.9871 7.61998 20.8046 6.95899 20.5869C5.62158 20.1464 4.69688 19.5723 3.91602 19.083C1.95717 17.8555 1.38802 15.556 2.25782 13.7998C2.76329 12.7794 3.60199 12.3493 4.18653 12.0068C4.7551 11.6737 5.1753 11.386 5.45606 10.7432C5.62517 9.31217 5.93987 8.01645 6.4668 6.92482C7.1312 5.54855 8.13407 4.49633 9.56251 3.92482C9.53157 3.34709 9.6391 2.63284 10.1133 1.98927C10.1972 1.87543 10.4043 1.594 10.7822 1.34669C11.1653 1.09611 11.6872 0.904101 12.3779 0.890636ZM14.1709 21.2608C13.6203 21.3007 13.0279 21.3242 12.3887 21.3242C11.7757 21.3242 11.2072 21.3024 10.6777 21.2656C11.0335 21.8421 11.6776 22.2324 12.4238 22.2324C13.1718 22.2321 13.816 21.8396 14.1709 21.2608ZM12.4004 2.38966C11.9872 2.39776 11.7419 2.50852 11.5996 2.60157C11.4528 2.6977 11.3746 2.801 11.3193 2.87599C11.088 3.19 11.031 3.56921 11.0664 3.92677C11.084 4.10311 11.1233 4.258 11.1631 4.37013C11.1875 4.43883 11.205 4.47361 11.21 4.48341C11.452 4.78119 11.4299 5.22068 11.1484 5.49415C10.8507 5.78325 10.3748 5.77716 10.0869 5.48048C10.0533 5.44582 10.0231 5.40711 9.99415 5.3672C9.0215 5.79157 8.31886 6.53162 7.81641 7.57228C7.21929 8.80941 6.91013 10.4656 6.82129 12.4746L6.81934 12.5137L6.81446 12.5518C6.73876 13.0607 6.67109 13.5103 6.53418 13.9121C6.38567 14.3476 6.16406 14.7061 5.82032 15.0899C5.54351 15.3988 5.06973 15.4268 4.76172 15.1514C4.45392 14.8758 4.42871 14.4019 4.70508 14.0928C4.93763 13.8332 5.04272 13.6453 5.11524 13.4326C5.14365 13.3492 5.16552 13.2588 5.18848 13.1553C5.10586 13.2062 5.02441 13.2544 4.94532 13.3008C4.28651 13.6868 3.87545 13.9129 3.60157 14.4658C3.08548 15.5082 3.38433 16.9793 4.71192 17.8115C5.4776 18.2913 6.27423 18.7818 7.42872 19.1621C8.58507 19.543 10.1358 19.8242 12.3887 19.8242C14.6416 19.8242 16.2108 19.5429 17.3857 19.1611C18.5582 18.7801 19.3721 18.2882 20.1328 17.8115C21.4611 16.9793 21.7595 15.5084 21.2432 14.4658C20.9668 13.9081 20.515 13.6867 19.7568 13.1846C19.7553 13.1835 19.7535 13.1827 19.752 13.1817C19.799 13.3591 19.8588 13.5202 19.9287 13.6514C20.021 13.8244 20.1034 13.8927 20.1533 13.917C20.5249 14.0981 20.6783 14.5465 20.4961 14.919C20.3135 15.2913 19.8639 15.4467 19.4922 15.2656C19.0607 15.0553 18.7821 14.6963 18.6035 14.3613C18.4238 14.0242 18.3154 13.6559 18.2471 13.3379C18.1778 13.0155 18.1437 12.7147 18.127 12.4971C18.1185 12.3873 18.1145 12.2956 18.1123 12.2305C18.1115 12.2065 18.1107 12.1856 18.1104 12.169C18.0569 11.6585 17.9885 11.1724 17.9082 10.7109C17.9002 10.6794 17.8913 10.6476 17.8838 10.6152L17.8906 10.6133C17.4166 7.97573 16.4732 6.17239 14.791 5.40821C14.5832 5.64607 14.2423 5.73912 13.9365 5.61036C13.5557 5.44988 13.3777 5.01056 13.5391 4.62892C13.5394 4.62821 13.5397 4.62699 13.54 4.62599C13.5425 4.61977 13.5479 4.6087 13.5537 4.59278C13.5658 4.55999 13.5837 4.50758 13.6035 4.44142C13.6438 4.30713 13.6903 4.12034 13.7139 3.91212C13.7631 3.47644 13.7038 3.06402 13.457 2.76857C13.3434 2.63264 13.0616 2.37678 12.4004 2.38966ZM10.1055 16.625C11.6872 16.8411 12.8931 16.8585 13.8174 16.7539C14.2287 16.7076 14.5997 17.0028 14.6465 17.4141C14.693 17.8256 14.3969 18.1976 13.9854 18.2442C12.9038 18.3665 11.5684 18.3389 9.90235 18.1113C9.49223 18.0551 9.20488 17.6768 9.26075 17.2666C9.3168 16.8563 9.6952 16.5691 10.1055 16.625ZM16.3887 16.3047C16.7403 16.086 17.203 16.1935 17.4219 16.5449C17.6406 16.8967 17.5324 17.3594 17.1807 17.5781C16.9689 17.7097 16.6577 17.8424 16.4033 17.9131C16.0045 18.0237 15.5914 17.7904 15.4805 17.3916C15.3696 16.9926 15.6031 16.5788 16.002 16.4678C16.1344 16.431 16.3112 16.3527 16.3887 16.3047Z"
32
32
-
fill="currentColor"
33
33
-
/>
34
34
-
</svg>
35
35
-
);
36
36
-
};
37
37
-
38
38
-
export const ReaderUnread = (props: Props) => {
39
39
-
return (
40
40
-
<svg
41
41
-
width="24"
42
42
-
height="24"
43
43
-
viewBox="0 0 24 24"
44
44
-
fill="none"
45
45
-
xmlns="http://www.w3.org/2000/svg"
46
29
{...props}
47
30
>
48
31
<path
49
49
-
d="M2.40963 18.0472C2.40983 17.3641 2.99636 17.3642 2.99655 18.0472C2.99654 18.7307 3.28805 19.1528 3.38815 19.263C3.48823 19.3732 3.66105 19.7179 4.28463 19.7181C4.90847 19.7182 4.90847 20.3255 4.28463 20.3255C3.66107 20.3256 3.56221 20.5899 3.38815 20.7816C3.21412 20.9732 2.99855 21.2572 2.9985 21.9232C2.9985 22.5896 2.41159 22.6066 2.41159 21.9232C2.41151 21.2398 2.04325 20.8276 2.00143 20.7816C1.959 20.735 1.52689 20.3255 1.03854 20.3255C0.549966 20.3254 0.554718 19.7182 1.03854 19.7181C1.52186 19.7181 1.83806 19.3644 1.93014 19.263C2.02172 19.1622 2.40963 18.7307 2.40963 18.0472ZM18.3989 13.7962C18.3991 13.1543 18.8958 13.1543 18.896 13.7962C18.896 14.4386 19.1424 14.8352 19.227 14.9388C19.3117 15.0425 19.4577 15.3663 19.9848 15.3665C20.5125 15.3666 20.5125 15.9378 19.9848 15.9378C19.4575 15.9379 19.3742 16.1864 19.227 16.3665C19.0798 16.5466 18.897 16.8131 18.8969 17.4388C18.8969 18.0651 18.4008 18.0811 18.4008 17.4388C18.4007 16.7986 18.0911 16.4117 18.0542 16.3665C18.0188 16.3233 17.653 15.9381 17.2397 15.9378C16.8263 15.9378 16.8303 15.3665 17.2397 15.3665C17.6486 15.3663 17.916 15.0338 17.9936 14.9388C18.0711 14.844 18.3989 14.4386 18.3989 13.7962ZM5.68893 1.79134C6.32061 1.54967 6.8992 1.76772 7.31002 2.04427C7.71467 2.31686 8.06882 2.71494 8.35299 3.07649C8.63964 3.44125 8.90666 3.83827 9.10299 4.11653C9.3417 4.45493 9.26161 4.92361 8.9233 5.16243C8.58506 5.40111 8.1173 5.31974 7.87838 4.98177C7.65546 4.66583 7.42734 4.32673 7.17233 4.00227C6.91507 3.67506 6.67898 3.42822 6.47311 3.28938C6.3745 3.22296 6.30685 3.19837 6.27096 3.19075C6.24474 3.18528 6.23525 3.18881 6.22506 3.1927C6.18423 3.20859 5.9833 3.32114 5.7192 3.88899C5.59862 4.14843 5.29699 5.01402 4.93209 6.10677C4.85847 6.12987 4.80511 6.14661 4.79831 6.15462C4.79485 6.15884 4.79121 6.16214 4.78854 6.16536C4.4966 6.19308 4.21288 6.31734 3.99459 6.54427C3.75682 6.79162 3.64898 7.10768 3.64791 7.40462C3.64696 7.70171 3.75272 8.02065 3.99264 8.27083C4.04882 8.32937 4.1096 8.38044 4.1733 8.42513C3.95587 9.09776 3.75091 9.74532 3.5776 10.2884C3.85066 10.3144 4.12174 10.3779 4.38034 10.4691C5.16136 10.7446 5.92693 11.3005 6.54928 12.0501C6.71967 11.9646 6.90306 11.9158 7.08932 11.8929C7.52605 11.8392 7.97349 11.9251 8.39889 12.1146C8.52073 11.5922 8.77238 11.1032 9.17428 10.6868C10.661 9.14683 13.2111 9.62241 14.8227 11.1781C14.9553 11.306 15.0799 11.4413 15.1977 11.5814C15.3522 11.0931 15.5412 10.4983 15.7387 9.87044C16.2338 8.29641 16.7876 6.52428 17.0298 5.71028C17.333 4.69126 17.7647 3.91964 18.3823 3.49056C19.0569 3.02218 19.7993 3.06179 20.4389 3.34017C21.047 3.60494 21.6053 4.09649 22.0825 4.63802C22.5684 5.18942 23.0142 5.84393 23.3862 6.50032C23.59 6.86052 23.4639 7.31757 23.104 7.52181C22.7438 7.72592 22.2859 7.59954 22.0815 7.23958C21.7486 6.6521 21.3605 6.08653 20.9575 5.62923C20.546 5.16239 20.1597 4.85528 19.8403 4.71614C19.5524 4.5908 19.3833 4.62119 19.2368 4.72298C19.0332 4.86476 18.7324 5.24367 18.4663 6.13802C18.2201 6.9656 17.6633 8.74963 17.1694 10.3197C16.922 11.1061 16.6893 11.8418 16.519 12.3802C16.4339 12.6494 16.3652 12.87 16.3169 13.0228C16.2928 13.0988 16.274 13.1581 16.2612 13.1986C16.2548 13.2188 16.2489 13.235 16.2456 13.2454C16.2441 13.2501 16.2425 13.2536 16.2417 13.2562V13.2591L16.2407 13.2601C16.2268 13.3038 16.2077 13.3449 16.187 13.3841C16.5566 14.5982 16.4051 15.8801 15.5122 16.805C14.0254 18.345 11.4753 17.8696 9.86373 16.3138C9.18414 15.6576 8.69133 14.8276 8.45944 13.972C8.05454 13.5525 7.64913 13.397 7.38424 13.3831C7.59712 13.8598 7.7328 14.345 7.7778 14.8138C7.86052 15.6775 7.64387 16.5969 6.91061 17.1702C6.17739 17.7433 5.23363 17.7322 4.41549 17.4437C3.58744 17.1515 2.77404 16.5464 2.13327 15.7269C1.49254 14.9074 1.10184 13.972 1.01803 13.098C0.936885 12.25 1.1447 11.3498 1.84616 10.7747C2.09807 9.97534 2.5868 8.4405 3.06979 6.96224C3.59658 5.34994 4.14583 3.71844 4.3608 3.25618C4.68344 2.56265 5.10288 2.01575 5.68893 1.79134ZM13.7807 12.2572C12.4881 11.0094 10.9295 11.0284 10.2534 11.7288C9.57757 12.4294 9.61347 13.987 10.9057 15.2347C12.1981 16.4823 13.7567 16.464 14.4331 15.764C15.1092 15.0636 15.0731 13.505 13.7807 12.2572ZM3.88229 11.8841C3.3528 11.6973 2.99993 11.7759 2.80905 11.9251C2.61843 12.0746 2.45867 12.3971 2.51217 12.9554C2.5648 13.5041 2.82326 14.1742 3.31491 14.8031C3.8066 15.4319 4.39472 15.8452 4.91452 16.0286C5.44348 16.2152 5.79586 16.1376 5.98678 15.9886C6.17756 15.8394 6.33808 15.5159 6.28463 14.9574C6.23201 14.4087 5.97256 13.7385 5.48092 13.1097C4.98934 12.481 4.40201 12.0676 3.88229 11.8841ZM11.9194 14.7786C12.0925 14.5637 12.4074 14.5295 12.6225 14.7025C12.661 14.7334 12.7453 14.7848 12.8491 14.8284C12.8979 14.849 12.9439 14.8642 12.9819 14.8743C13.0173 14.8837 13.0359 14.8858 13.0395 14.8861C13.3156 14.8914 13.5361 15.1197 13.5307 15.3958C13.5253 15.6718 13.2969 15.8912 13.021 15.8861C12.823 15.8822 12.6163 15.8145 12.4614 15.7493C12.2997 15.6813 12.1271 15.5876 11.9956 15.4818C11.7806 15.3087 11.7465 14.9937 11.9194 14.7786ZM3.50924 12.1361L3.57955 12.1497L3.6733 12.1878C3.88055 12.2932 3.99317 12.533 3.92916 12.7659C3.90752 12.8445 3.8653 12.9118 3.81393 12.9681C3.81694 12.9884 3.81922 13.0124 3.82467 13.0384C3.87694 13.2878 4.02405 13.6447 4.28561 13.9671C4.45941 14.1814 4.42741 14.4972 4.21334 14.6712C3.99906 14.8451 3.68332 14.812 3.50924 14.598C3.14412 14.1481 2.92999 13.6431 2.84616 13.2425C2.80618 13.0513 2.78536 12.8362 2.82565 12.6468C2.84499 12.5561 2.89269 12.4054 3.02291 12.2845C3.16403 12.1538 3.34353 12.1108 3.50924 12.1361ZM11.0669 11.7454C11.2971 11.7138 11.5265 11.8478 11.6069 12.0755C11.6924 12.3193 11.576 12.5828 11.3471 12.6908C11.3428 12.696 11.3346 12.705 11.3256 12.721C11.2978 12.7706 11.2672 12.8577 11.2592 12.9779C11.244 13.2098 11.3168 13.5618 11.6518 13.9544C11.831 14.1644 11.806 14.4802 11.5962 14.6595C11.3862 14.8387 11.0704 14.8145 10.8911 14.6048C10.4014 14.0312 10.2273 13.4258 10.2612 12.9115C10.2779 12.6589 10.3462 12.4249 10.4546 12.2318C10.5444 12.0719 10.6842 11.9039 10.8803 11.807L10.9672 11.7699L11.0669 11.7454ZM5.92428 5.79427C5.92428 5.2357 6.35593 5.23572 6.35592 5.79427C6.35593 6.35264 6.57034 6.69727 6.64401 6.78743C6.71763 6.87749 6.84534 7.15945 7.30416 7.1595C7.76238 7.15988 7.76238 7.65527 7.30416 7.65559C6.84534 7.65559 6.77205 7.872 6.64401 8.02864C6.51604 8.18525 6.35794 8.41728 6.35788 8.96126C6.35788 9.50588 5.92623 9.51978 5.92623 8.96126C5.92613 8.40366 5.65582 8.067 5.62448 8.02864C5.59372 7.99102 5.27579 7.65582 4.91647 7.65559C4.557 7.65559 4.56049 7.1595 4.91647 7.1595C5.27178 7.15932 5.50406 6.87024 5.57174 6.78743C5.63909 6.70504 5.92426 6.3528 5.92428 5.79427Z"
50
50
-
fill="currentColor"
51
51
-
/>
52
52
-
</svg>
53
53
-
);
54
54
-
};
55
55
-
56
56
-
export const ReaderRead = (props: Props) => {
57
57
-
return (
58
58
-
<svg
59
59
-
width="24"
60
60
-
height="24"
61
61
-
viewBox="0 0 24 24"
62
62
-
fill="none"
63
63
-
xmlns="http://www.w3.org/2000/svg"
64
64
-
{...props}
65
65
-
>
66
66
-
<path
67
67
-
d="M5.3939 5.10098C6.94949 3.45228 9.5127 3.07248 11.1166 4.58535C11.8822 5.30769 12.2281 6.27357 12.2132 7.26504C12.4456 7.20657 12.6982 7.16362 12.9515 7.15469C13.2516 7.14413 13.6091 7.17916 13.9379 7.34707C14.6404 7.7064 15.0081 8.33088 15.142 8.9418C16.5998 8.30589 18.3571 8.43563 19.7631 9.42032C21.8907 10.9106 22.4521 13.8268 20.9711 15.9418C20.5099 16.6002 19.9071 17.0981 19.2328 17.4281C19.2725 17.8704 19.3144 18.3372 19.389 18.8285C19.4945 19.5226 19.6505 20.0808 19.8754 20.4223C20.103 20.7681 20.0071 21.2335 19.6615 21.4613C19.3156 21.6891 18.8503 21.5932 18.6224 21.2475C18.2076 20.6174 18.0171 19.7803 17.9066 19.0531C17.8466 18.658 17.8029 18.2404 17.7679 17.8647C16.6347 18.0087 15.441 17.7451 14.4291 17.0365C12.3744 15.5975 11.7805 12.8288 13.0756 10.7358L11.4466 9.68106C11.2965 9.90817 11.1261 10.1258 10.9349 10.3285C9.3795 11.9772 6.81619 12.3575 5.21226 10.8451C4.85829 10.5112 4.59328 10.1249 4.41246 9.70841C4.12505 9.84619 3.7775 10.0195 3.40464 10.2016C3.08808 10.3561 2.76192 10.5118 2.47203 10.6361C2.20246 10.7518 1.89418 10.872 1.63999 10.9145C1.23165 10.9825 0.845053 10.7066 0.776711 10.2982C0.7085 9.88981 0.984507 9.50334 1.39292 9.43497C1.44871 9.42563 1.60626 9.37614 1.8812 9.25821C2.1356 9.14908 2.43339 9.00579 2.74644 8.85294C3.20082 8.63107 3.71706 8.37021 4.11265 8.19278C4.12147 7.09833 4.57394 5.97021 5.3939 5.10098ZM18.9027 10.6488C17.7826 9.86431 16.3636 9.87558 15.3129 10.5473C16.188 11.0878 17.0483 11.6416 17.7211 12.0824C18.1169 12.3418 18.449 12.5624 18.682 12.7182C18.7984 12.796 18.8907 12.8585 18.9535 12.9008C18.9844 12.9216 19.0085 12.9377 19.0248 12.9486C19.0328 12.9541 19.0392 12.9585 19.0433 12.9613C19.0454 12.9627 19.0471 12.9645 19.0482 12.9652H19.0492V12.9662C19.2776 13.1212 19.3377 13.4321 19.183 13.6606C19.0279 13.8888 18.7161 13.9473 18.4877 13.7924L18.4867 13.7934C18.4857 13.7927 18.4847 13.7908 18.4828 13.7895C18.4789 13.7868 18.4729 13.7829 18.4652 13.7777C18.4493 13.767 18.4248 13.7507 18.3939 13.7299C18.3771 13.7186 18.3582 13.7059 18.3373 13.6918C18.3409 13.7007 18.3455 13.7094 18.349 13.7182C18.4391 13.9478 18.4846 14.151 18.514 14.3129C18.5488 14.5038 18.5528 14.5587 18.5697 14.6166C18.6475 14.8814 18.4955 15.1597 18.2308 15.2377C17.9663 15.3152 17.6888 15.1642 17.6107 14.8998C17.5741 14.7753 17.5483 14.5898 17.5306 14.4926C17.5076 14.366 17.4762 14.2309 17.4183 14.0834C17.3064 13.7986 17.0738 13.4138 16.516 12.9633L14.3353 11.5512C13.4914 12.949 13.8764 14.8184 15.2894 15.808C16.7626 16.8395 18.752 16.4941 19.7416 15.0815C20.731 13.6686 20.3757 11.6807 18.9027 10.6488ZM10.0873 5.67715C9.23327 4.87156 7.62151 4.92548 6.48472 6.13028C5.34805 7.33535 5.38756 8.94767 6.24156 9.75333C7.09567 10.5587 8.70742 10.5041 9.8441 9.29923C9.97166 9.16397 10.0826 9.02211 10.181 8.87833C8.43436 8.11224 8.03413 8.1053 7.73863 8.15372C7.49417 8.19384 7.43342 8.19931 7.34215 8.21719C7.27583 8.2302 7.20421 8.24884 7.00426 8.31387C6.74185 8.39904 6.45989 8.25486 6.37437 7.99258C6.28923 7.73019 6.43242 7.44723 6.69469 7.36172C6.90022 7.29488 7.02051 7.26011 7.14976 7.23477C7.25177 7.2148 7.38857 7.1961 7.5648 7.16739L7.50523 7.1293C7.27353 6.9792 7.20675 6.66966 7.3568 6.43789C7.50691 6.20642 7.81653 6.14058 8.0482 6.29043L10.6127 7.95059C10.8517 7.07384 10.6453 6.20394 10.0873 5.67715ZM13.0043 8.65372C12.9388 8.65604 12.868 8.66411 12.7933 8.67618L13.6478 9.14883C13.5794 8.94601 13.4513 8.7833 13.2552 8.68301C13.2369 8.67373 13.1626 8.64818 13.0043 8.65372Z"
32
32
+
d="M12.379 1.43198C13.4689 1.41079 14.1368 1.86924 14.4992 2.30308C15.0424 2.95384 15.1168 3.72838 15.0753 4.3021C17.3983 5.25881 18.4631 7.59734 18.9484 10.3275C19.1445 11.0495 19.539 11.3859 20.0538 11.7269C20.5738 12.0711 21.4604 12.5232 21.9367 13.4847C22.7585 15.1448 22.219 17.3154 20.3732 18.472C19.6405 18.9311 18.7598 19.4667 17.4933 19.8783C16.8876 20.0751 16.2004 20.2389 15.4054 20.3587C15.0286 21.64 13.8299 22.5687 12.422 22.5687C11.0175 22.5684 9.8201 21.6443 9.44056 20.3675C8.62793 20.2471 7.93094 20.079 7.31849 19.8773C6.0667 19.465 5.20053 18.928 4.47279 18.472C2.62669 17.3153 2.08725 15.1449 2.90931 13.4847C3.38819 12.5179 4.18479 12.1099 4.72669 11.7923C5.25122 11.485 5.62837 11.2249 5.88294 10.6478C6.04112 9.31375 6.33609 8.10299 6.82923 7.0814C7.44748 5.8009 8.37993 4.81743 9.70521 4.27671C9.68221 3.73659 9.78903 3.07493 10.2296 2.4769C10.3087 2.36964 10.5055 2.10112 10.8654 1.86558C11.2304 1.62673 11.7262 1.44477 12.379 1.43198ZM13.963 20.515C13.4751 20.5481 12.9528 20.5667 12.3917 20.5667C11.8542 20.5667 11.3526 20.5494 10.8839 20.5189C11.2161 20.9991 11.7775 21.3185 12.422 21.3187C13.0684 21.3187 13.6311 20.9974 13.963 20.515ZM12.4035 2.93198C12.0278 2.93931 11.807 3.03915 11.6827 3.12046C11.5541 3.20485 11.4861 3.29613 11.4357 3.3646C11.2306 3.64338 11.1781 3.98084 11.2101 4.30503C11.233 4.53653 11.3069 4.74354 11.3361 4.8021C11.5745 5.09978 11.5517 5.53674 11.2716 5.80894C10.9739 6.09788 10.498 6.09183 10.2101 5.79526C10.1865 5.77095 10.1678 5.74218 10.1466 5.71519C9.27113 6.10725 8.63618 6.78165 8.17884 7.72886C7.627 8.87197 7.33861 10.4065 7.25599 12.2748C7.24499 12.7149 7.1279 13.2121 6.98646 13.6273C6.84551 14.0408 6.6358 14.3817 6.31166 14.7435C6.03482 15.0524 5.56101 15.0794 5.25306 14.8041C4.9451 14.5283 4.91961 14.0536 5.19642 13.7445C5.40901 13.5071 5.50261 13.3391 5.56751 13.1488C5.58207 13.1061 5.59391 13.0608 5.60658 13.013C5.56502 13.0379 5.52488 13.0636 5.48451 13.0873C4.86861 13.4481 4.50111 13.6519 4.25404 14.1507C3.78545 15.0972 4.05431 16.439 5.26966 17.2005C5.98211 17.6469 6.71946 18.1005 7.78822 18.4525C8.85905 18.8051 10.298 19.0667 12.3917 19.0667C14.4855 19.0667 15.9412 18.8051 17.0294 18.4515C18.1149 18.0987 18.8688 17.6438 19.5763 17.2005C20.7913 16.4391 21.0603 15.0971 20.5919 14.1507C20.3558 13.674 19.9814 13.4704 19.338 13.0501C19.3917 13.2186 19.4731 13.4853 19.6447 13.5697C20.0162 13.7509 20.17 14.2002 19.9874 14.5726C19.8047 14.9447 19.3551 15.0992 18.9835 14.9183C18.5687 14.716 18.3022 14.3715 18.1329 14.0541C17.9627 13.7344 17.8602 13.3869 17.796 13.0882C17.7309 12.7851 17.6995 12.5025 17.6837 12.2982C17.639 11.7172 17.5904 11.1217 17.4591 10.5531L17.465 10.5511C17.0282 8.11865 16.1654 6.46451 14.6427 5.75327C14.4333 5.97064 14.1064 6.05064 13.8126 5.9271C13.4133 5.75888 13.2861 5.33204 13.4152 4.94468C13.4307 4.90565 13.536 4.62297 13.5734 4.29331C13.6186 3.89372 13.5628 3.5267 13.3458 3.26694C13.2493 3.15138 13.0022 2.92054 12.4035 2.93198ZM10.2716 16.0873C11.742 16.2881 12.8605 16.3032 13.716 16.2064C14.1272 16.1602 14.4984 16.4563 14.5451 16.8675C14.5915 17.279 14.2954 17.651 13.8839 17.6976C12.8712 17.8122 11.6232 17.786 10.0685 17.5736C9.65818 17.5175 9.37096 17.1392 9.42689 16.7289C9.48296 16.3185 9.86121 16.0312 10.2716 16.0873ZM16.09 15.7962C16.4415 15.5778 16.9034 15.6852 17.1222 16.0365C17.3407 16.3881 17.2334 16.8509 16.882 17.0697C16.6801 17.1952 16.385 17.321 16.1437 17.388C15.7448 17.4987 15.3318 17.2644 15.2208 16.8656C15.1102 16.4666 15.3434 16.0537 15.7423 15.9427C15.8619 15.9095 16.0227 15.8381 16.09 15.7962Z"
68
33
fill="currentColor"
69
34
/>
70
35
</svg>
+19
components/Icons/TagSmall.tsx
···
1
1
+
import { Props } from "./Props";
2
2
+
3
3
+
export const TagSmall = (props: Props) => {
4
4
+
return (
5
5
+
<svg
6
6
+
width="24"
7
7
+
height="24"
8
8
+
viewBox="0 0 24 24"
9
9
+
fill="none"
10
10
+
xmlns="http://www.w3.org/2000/svg"
11
11
+
{...props}
12
12
+
>
13
13
+
<path
14
14
+
d="M6.72467 12.065C7.3108 11.6577 8.11602 11.8032 8.5235 12.3893C8.93088 12.9754 8.78635 13.7806 8.20026 14.1881C7.72319 14.5197 7.10087 14.4854 6.66608 14.1451C5.6484 14.4853 4.81236 15.2231 4.31256 16.1021C3.73575 17.1169 3.65902 18.2144 4.12213 19.0484C4.47731 19.6876 5.18264 20.0117 6.20514 20.0758C7.22138 20.1393 8.37845 19.9287 9.3399 19.6812C10.7978 19.3061 11.89 19.606 12.584 20.2672C12.9149 20.5824 13.1265 20.9561 13.2393 21.3121C13.3463 21.6497 13.3853 22.0412 13.2784 22.3863C13.1557 22.7818 12.7354 23.003 12.3399 22.8805C11.9689 22.7654 11.7507 22.3889 11.8262 22.0162L11.8419 21.9518C11.8386 21.9605 11.8509 21.8957 11.8096 21.7652C11.7675 21.6322 11.6837 21.4816 11.5489 21.3531C11.3113 21.127 10.7896 20.8563 9.71295 21.1334C8.70042 21.394 7.3632 21.6522 6.11139 21.5738C4.86592 21.4958 3.52842 21.0674 2.81158 19.7779C2.02826 18.368 2.24712 16.6994 3.00787 15.3609C3.68152 14.176 4.82017 13.1659 6.2403 12.7066C6.32636 12.4555 6.49002 12.2282 6.72467 12.065ZM19.9464 11.7271C20.2297 11.5306 20.6186 11.6012 20.8155 11.8844C21.0123 12.1677 20.9424 12.5565 20.6592 12.7535L13.0342 18.0504C12.5945 18.3558 12.0716 18.5201 11.5362 18.5201H6.94928C6.60423 18.5201 6.32351 18.2401 6.3233 17.8951C6.32356 17.5503 6.60351 17.2704 6.9483 17.2701L11.5362 17.2711C11.8166 17.2711 12.091 17.184 12.3214 17.024L19.9464 11.7271ZM14.669 1.39902C15.4624 0.847523 16.5528 1.04335 17.1046 1.83652L21.3663 7.9664C21.9179 8.75983 21.722 9.85015 20.9288 10.4019L12.252 16.4352C11.8686 16.7016 11.4113 16.8423 10.9444 16.8375L6.69147 16.7935C6.27743 16.7892 5.94511 16.4498 5.94928 16.0357C5.95367 15.6217 6.293 15.2893 6.70709 15.2935L10.96 15.3375C11.1156 15.339 11.2678 15.2915 11.3956 15.2027L20.0723 9.1705C20.1855 9.09164 20.2136 8.93615 20.1348 8.82285L15.8731 2.69296C15.7943 2.57985 15.6387 2.55191 15.5255 2.63046L6.88873 8.63437C6.74865 8.73176 6.64607 8.87505 6.59772 9.03867L5.64459 12.2682C5.52741 12.6654 5.11018 12.893 4.71295 12.776C4.31582 12.6587 4.08894 12.2415 4.20612 11.8443L5.15826 8.61386C5.30323 8.1228 5.6119 7.69523 6.03229 7.40292L14.669 1.39902ZM14.086 5.54355C14.1404 5.5563 14.1874 5.59162 14.2149 5.64023L15.0626 7.14706L16.5167 5.84726C16.5594 5.80926 16.6162 5.79077 16.6729 5.79745C16.7299 5.80432 16.782 5.83608 16.8145 5.88339L17.4844 6.85995C17.5169 6.90725 17.5277 6.96644 17.5137 7.02206C17.4996 7.07758 17.4621 7.12477 17.4112 7.15097L15.6739 8.03964L16.796 9.40097C16.8316 9.44425 16.8477 9.5017 16.8399 9.55722C16.832 9.61254 16.8009 9.66223 16.7549 9.69394L15.9327 10.2574C15.8866 10.289 15.8299 10.3001 15.7755 10.2877C15.7208 10.275 15.6731 10.2398 15.6456 10.191L14.7823 8.65976L13.8008 9.58456C13.7863 9.5982 13.7699 9.60998 13.752 9.61874L12.4571 10.2516L13.5762 11.6109C13.6119 11.6542 13.628 11.7116 13.6202 11.7672C13.6123 11.8225 13.5812 11.8722 13.5352 11.9039L12.713 12.4674C12.6669 12.499 12.6092 12.5101 12.5547 12.4977C12.5007 12.4851 12.4545 12.4501 12.4268 12.4019L11.5499 10.8697L10.1046 12.1646C10.0618 12.203 10.0044 12.2222 9.94733 12.2154C9.89045 12.2085 9.83922 12.1767 9.8067 12.1295L9.1358 11.1529C9.10345 11.1057 9.09259 11.0463 9.10651 10.9908C9.12065 10.9351 9.1588 10.8871 9.21002 10.8609L10.9376 9.97812L9.84381 8.63925C9.80844 8.59592 9.79291 8.53934 9.80084 8.48398C9.80882 8.42869 9.83975 8.37888 9.8858 8.34726L10.7081 7.78378C10.7543 7.75217 10.8117 7.74085 10.8663 7.75351C10.9208 7.76625 10.9677 7.80144 10.9952 7.85019L11.8419 9.35312L12.8985 8.3746C12.9131 8.36104 12.9293 8.34908 12.9473 8.34042L14.1612 7.75742L13.0645 6.43027C13.0288 6.38701 13.0128 6.33052 13.0206 6.27499C13.0284 6.21943 13.0593 6.16905 13.1055 6.1373L13.9278 5.57382C13.9739 5.54231 14.0316 5.53098 14.086 5.54355Z"
15
15
+
fill="currentColor"
16
16
+
/>
17
17
+
</svg>
18
18
+
);
19
19
+
};
+8
-8
components/PageLayouts/DashboardLayout.tsx
···
4
4
import { Header } from "../PageHeader";
5
5
import { Footer } from "components/ActionBar/Footer";
6
6
import { Sidebar } from "components/ActionBar/Sidebar";
7
7
+
import { DesktopNavigation } from "components/ActionBar/DesktopNavigation";
8
8
+
9
9
+
import { MobileNavigation } from "components/ActionBar/MobileNavigation";
7
10
import {
8
8
-
DesktopNavigation,
9
9
-
MobileNavigation,
10
11
navPages,
11
12
NotificationButton,
12
12
-
} from "components/ActionBar/Navigation";
13
13
+
} from "components/ActionBar/NavigationButtons";
13
14
import { create } from "zustand";
14
15
import { Popover } from "components/Popover";
15
16
import { Checkbox } from "components/Checkbox";
···
138
139
defaultTab: keyof T;
139
140
currentPage: navPages;
140
141
publication?: string;
142
142
+
profileDid?: string;
141
143
actions: React.ReactNode;
142
144
}) {
143
145
const searchParams = useSearchParams();
···
240
242
<Footer>
241
243
<MobileNavigation
242
244
currentPage={props.currentPage}
243
243
-
publication={props.publication}
245
245
+
currentPublicationUri={props.publication}
246
246
+
currentProfileDid={props.profileDid}
244
247
/>
245
248
{props.actions && (
246
246
-
<>
247
247
-
<Separator />
248
248
-
{props.actions}
249
249
-
</>
249
249
+
<div className="place-self-end flex gap-2">{props.actions}</div>
250
250
)}
251
251
</Footer>
252
252
</div>
+12
src/utils/getRecordFromDid.ts
···
1
1
+
import { callRPC } from "app/api/rpc/client";
2
2
+
import { ProfileViewDetailed } from "@atproto/api/dist/client/types/app/bsky/actor/defs";
3
3
+
import useSWR from "swr";
4
4
+
5
5
+
export function useProfileFromDid(did: string | undefined) {
6
6
+
return useSWR(did ? ["profile-data", did] : null, async () => {
7
7
+
const response = await callRPC("get_profile_data", {
8
8
+
didOrHandle: did!,
9
9
+
});
10
10
+
return response.result.profile as ProfileViewDetailed | undefined;
11
11
+
});
12
12
+
}