mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Make app endpoints a generated value
This commit is contained in:
parent
ea17b014af
commit
63c405943e
7 changed files with 56 additions and 20 deletions
11
helpers/app-derived.js
Normal file
11
helpers/app-derived.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
// App Data that is derived from other app data
|
||||
|
||||
export function getAppEndpoint ( app ) {
|
||||
// console.log('app', app)
|
||||
|
||||
if (app.category.slug === 'homebrew') return `/formula/${app.slug}`
|
||||
|
||||
if (app.category.slug === 'games') return `/game/${app.slug}`
|
||||
|
||||
return `/app/${app.slug}`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue