tangled
alpha
login
or
join now
vielle.dev
/
pdsls
forked from
pds.ls/pdsls
0
fork
atom
atproto explorer
0
fork
atom
overview
issues
pulls
pipelines
cleanup code
handle.invalid
6 months ago
751f3f52
368b6074
+20
-21
2 changed files
expand all
collapse all
unified
split
src
components
navbar.tsx
layout.tsx
+14
-14
src/components/navbar.tsx
···
12
12
export const [validSchema, setValidSchema] = createSignal<boolean | undefined>(undefined);
13
13
14
14
const swapIcons: Record<string, string> = {
15
15
-
"did:plc:vwzwgnygau7ed7b7wt5ux7y2": "iconify lucide--microchip",
16
16
-
"did:plc:oisofpd7lj26yvgiivf3lxsi": "iconify lucide--bone",
17
17
-
"did:plc:uu5axsmbm2or2dngy4gwchec": "iconify lucide--train-track",
18
18
-
"did:plc:7x6rtuenkuvxq3zsvffp2ide": "iconify lucide--rabbit",
19
19
-
"did:plc:ia76kvnndjutgedggx2ibrem": "iconify lucide--rabbit",
20
20
-
"did:plc:hvakvedv6byxhufjl23mfmsd": "iconify lucide--rat",
21
21
-
"did:plc:ezhjhbzqt32bqprrn6qjlkri": "iconify lucide--film",
22
22
-
"did:plc:6v6jqsy7swpzuu53rmzaybjy": "iconify lucide--fish",
23
23
-
"did:plc:hx53snho72xoj7zqt5uice4u": "iconify lucide--rose",
24
24
-
"did:plc:wzsilnxf24ehtmmc3gssy5bu": "iconify lucide--music-2",
25
25
-
"did:plc:bnqkww7bjxaacajzvu5gswdf": "iconify lucide--gem",
26
26
-
"did:plc:hdhoaan3xa3jiuq4fg4mefid": "iconify lucide--sparkles",
15
15
+
"did:plc:vwzwgnygau7ed7b7wt5ux7y2": "lucide--microchip",
16
16
+
"did:plc:oisofpd7lj26yvgiivf3lxsi": "lucide--bone",
17
17
+
"did:plc:uu5axsmbm2or2dngy4gwchec": "lucide--train-track",
18
18
+
"did:plc:7x6rtuenkuvxq3zsvffp2ide": "lucide--rabbit",
19
19
+
"did:plc:ia76kvnndjutgedggx2ibrem": "lucide--rabbit",
20
20
+
"did:plc:hvakvedv6byxhufjl23mfmsd": "lucide--rat",
21
21
+
"did:plc:ezhjhbzqt32bqprrn6qjlkri": "lucide--film",
22
22
+
"did:plc:6v6jqsy7swpzuu53rmzaybjy": "lucide--fish",
23
23
+
"did:plc:hx53snho72xoj7zqt5uice4u": "lucide--rose",
24
24
+
"did:plc:wzsilnxf24ehtmmc3gssy5bu": "lucide--music-2",
25
25
+
"did:plc:bnqkww7bjxaacajzvu5gswdf": "lucide--gem",
26
26
+
"did:plc:hdhoaan3xa3jiuq4fg4mefid": "lucide--sparkles",
27
27
};
28
28
29
29
const NavBar = (props: { params: Params }) => {
···
144
144
setShowHandle(!showHandle());
145
145
}}
146
146
class={
147
147
-
`shrink-0 text-lg transition-transform duration-400 ${showHandle() ? "rotate-y-180" : ""} ` +
148
148
-
(swapIcons[props.params.repo] ?? "iconify lucide--arrow-left-right")
147
147
+
`iconify shrink-0 text-lg transition-transform duration-400 ${showHandle() ? "rotate-y-180" : ""} ` +
148
148
+
(swapIcons[props.params.repo] ?? "lucide--arrow-left-right")
149
149
}
150
150
></button>
151
151
</Tooltip>
+6
-7
src/layout.tsx
···
1
1
import { createEffect, createSignal, ErrorBoundary, Show, Suspense } from "solid-js";
2
2
-
import { A, RouteSectionProps, useLocation, useNavigate, useParams } from "@solidjs/router";
2
2
+
import { A, RouteSectionProps, useLocation, useNavigate } from "@solidjs/router";
3
3
import { agent } from "./components/login.jsx";
4
4
import { RecordEditor } from "./components/create.jsx";
5
5
import Tooltip from "./components/tooltip.jsx";
···
18
18
}>({ show: false });
19
19
20
20
const Layout = (props: RouteSectionProps<unknown>) => {
21
21
-
const params = useParams();
22
21
const location = useLocation();
23
22
const navigate = useNavigate();
24
23
let timeout: number;
25
24
26
25
createEffect(async () => {
27
27
-
if (params.repo && !params.repo.startsWith("did:")) {
28
28
-
const did = await resolveHandle(params.repo as Handle);
29
29
-
navigate(location.pathname.replace(params.repo, did));
26
26
+
if (props.params.repo && !props.params.repo.startsWith("did:")) {
27
27
+
const did = await resolveHandle(props.params.repo as Handle);
28
28
+
navigate(location.pathname.replace(props.params.repo, did));
30
29
}
31
30
});
32
31
···
72
71
<Show when={location.pathname !== "/jetstream" && location.pathname !== "/firehose"}>
73
72
<Search />
74
73
</Show>
75
75
-
<Show when={params.pds}>
76
76
-
<NavBar params={params} />
74
74
+
<Show when={props.params.pds}>
75
75
+
<NavBar params={props.params} />
77
76
</Show>
78
77
<Show keyed when={location.pathname}>
79
78
<ErrorBoundary