From bef3da2a567e3804e12355d9c3d5c09439dbe2ea Mon Sep 17 00:00:00 2001
From: Joel Klinghed <the_jk@spawned.biz>
Date: Thu, 17 Jul 2025 23:42:55 +0200
Subject: Humble beginnings

Redirect to login if not logged in, on login session cookie is set
and projects or reviews are listed.
---
 client/src/lib/ListPrevNext.svelte | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 client/src/lib/ListPrevNext.svelte

(limited to 'client/src/lib/ListPrevNext.svelte')

diff --git a/client/src/lib/ListPrevNext.svelte b/client/src/lib/ListPrevNext.svelte
new file mode 100644
index 0000000..89a5c14
--- /dev/null
+++ b/client/src/lib/ListPrevNext.svelte
@@ -0,0 +1,10 @@
+<script lang="ts">
+  let { list, query_offset = 'offset' } = $props();
+</script>
+
+{#if list.offset > 0}
+  <a href="?{query_offset}={Math.max(0, list.offset - list.limit)}">Previous</a>
+{/if}
+{#if list.more}
+  <a href="?{query_offset}={list.offset + list.limit}">Next</a>
+{/if}
-- 
cgit v1.2.3-70-g09d2

