about summary refs log tree commit diff
path: root/src/lib/routes/links.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/routes/links.ts')
-rw-r--r--src/lib/routes/links.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/routes/links.ts b/src/lib/routes/links.ts
index 8a9950262..10c99b62d 100644
--- a/src/lib/routes/links.ts
+++ b/src/lib/routes/links.ts
@@ -19,9 +19,13 @@ export function makeProfileLink(
 export function makeCustomFeedLink(
   did: string,
   rkey: string,
-  ...segments: string[]
+  segment?: string | undefined,
+  feedCacheKey?: 'discover' | 'explore' | undefined,
 ) {
-  return [`/profile`, did, 'feed', rkey, ...segments].join('/')
+  return (
+    [`/profile`, did, 'feed', rkey, ...(segment ? [segment] : [])].join('/') +
+    (feedCacheKey ? `?feedCacheKey=${encodeURIComponent(feedCacheKey)}` : '')
+  )
 }
 
 export function makeListLink(did: string, rkey: string, ...segments: string[]) {