« get me outta code hell

refactor/tweak getGridHTML to use link() fns - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/page
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2021-12-31 21:16:59 -0400
committer(quasar) nebula <qznebula@protonmail.com>2021-12-31 21:16:59 -0400
commit5b1418b417c2bac641a8671e7da5cf02aefa6245 (patch)
treedba642ee9fbcb6d4e8707c007c0962e8621f946c /src/page
parent7710fc578ec94bb9edca551e7d38ab30d8560ecf (diff)
refactor/tweak getGridHTML to use link() fns
Diffstat (limited to 'src/page')
-rw-r--r--src/page/artist.js6
-rw-r--r--src/page/tag.js6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/page/artist.js b/src/page/artist.js
index 2e87669d..e6160be3 100644
--- a/src/page/artist.js
+++ b/src/page/artist.js
@@ -452,9 +452,9 @@ export function write(artist, {wikiData}) {
                             srcFn: thing => (thing.album
                                 ? getTrackCover(thing)
                                 : getAlbumCover(thing)),
-                            hrefFn: thing => (thing.album
-                                ? to('localized.track', thing.directory)
-                                : to('localized.album', thing.directory))
+                            linkFn: (thing, opts) => (thing.album
+                                ? link.track(thing, opts)
+                                : link.album(thing, opts))
                         })}
                     </div>
                 `
diff --git a/src/page/tag.js b/src/page/tag.js
index 4253120e..791c713d 100644
--- a/src/page/tag.js
+++ b/src/page/tag.js
@@ -53,9 +53,9 @@ export function write(tag, {wikiData}) {
                             srcFn: thing => (thing.album
                                 ? getTrackCover(thing)
                                 : getAlbumCover(thing)),
-                            hrefFn: thing => (thing.album
-                                ? to('localized.track', thing.directory)
-                                : to('localized.album', thing.directory))
+                            linkFn: (thing, opts) => (thing.album
+                                ? link.track(thing, opts)
+                                : link.album(thing, opts))
                         })}
                     </div>
                 `