{@render children?.()}
+ import Header from '$lib/components/ui/layout/pages/Header.svelte'
+ import Tabs from '$lib/components/ui/layout/pages/Tabs.svelte'
+
+ let { children } = $props()
+
+
+
+
+
+
+
+{@render children?.()}
diff --git a/src/routes/instances/+layout.ts b/src/routes/instances/+layout.ts
new file mode 100644
index 00000000..6455fc2b
--- /dev/null
+++ b/src/routes/instances/+layout.ts
@@ -0,0 +1,6 @@
+import { getClient } from '$lib/lemmy.svelte.js'
+
+export async function load({ fetch }) {
+ return (await getClient(undefined, fetch).getFederatedInstances())
+ .federated_instances
+}
diff --git a/src/routes/instances/+page.svelte b/src/routes/instances/+page.svelte
deleted file mode 100644
index 1fccaeed..00000000
--- a/src/routes/instances/+page.svelte
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
-{#if data}
-
-
-
- Linked
-
- {#snippet target()}
-
- {/snippet}
-
- These are the instances your instance can see and interact with
- content from.
-
-
-
-
- {#if data.linked && data.linked.length > 0}
- {#each data.linked?.sort((b, a) => b.id - a.id) as instance (instance.id)}
-
-
- {instance.domain}
-
- {instance.software ?? 'Unknown'} •
-
-
-
- {/each}
- {:else}
-
- {/if}
-
-
-
-
- Blocked
-
-
- {#snippet target()}
-
- {/snippet}
-
- These are the instances your instance is explicitly blocking content
- from.
-
-
-
-
- {#if data.blocked && data.blocked.length > 0}
- {#each data.blocked?.sort((b, a) => b.id - a.id) as instance (instance.id)}
-
-
- {instance.domain}
-
- {instance.software ?? 'Unknown'} •
-
-
-
- {/each}
- {:else}
-
- {/if}
-
-
-
-{/if}
diff --git a/src/routes/instances/+page.ts b/src/routes/instances/+page.ts
index 6455fc2b..186fbbd3 100644
--- a/src/routes/instances/+page.ts
+++ b/src/routes/instances/+page.ts
@@ -1,6 +1,5 @@
-import { getClient } from '$lib/lemmy.svelte.js'
+import { redirect } from '@sveltejs/kit'
-export async function load({ fetch }) {
- return (await getClient(undefined, fetch).getFederatedInstances())
- .federated_instances
+export function load() {
+ redirect(302, '/instances/linked')
}
diff --git a/src/routes/instances/linked/+page.svelte b/src/routes/instances/linked/+page.svelte
new file mode 100644
index 00000000..105be8ce
--- /dev/null
+++ b/src/routes/instances/linked/+page.svelte
@@ -0,0 +1,52 @@
+
+
+{#if data}
+
+
+ {#if data.linked && data.linked.length > 0}
+
+ {#snippet item(index)}
+
+
+ {data.linked[index].domain}
+
+ {data.linked[index].software ?? 'Unknown'} •
+
+
+
+ {/snippet}
+
+ {:else}
+
+ {/if}
+
+
+{/if}