-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d86cd9c
commit 7d62bf8
Showing
25 changed files
with
223 additions
and
315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export { EntityManager } from './EntityManager' | ||
export { EntityManagerService, Action as EntityManagerAction } from './types' | ||
export type { EntityManagerService } from './types' | ||
export { Action as EntityManagerAction } from './types' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export { Storage } from './Storage' | ||
export { StorageService } from './types' | ||
export type { StorageService } from './types' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 0 additions & 67 deletions
67
packages/web/src/pages/server-track-page/desktop/ServerTrackPage.module.css
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { Maybe } from '@audius/common/utils' | ||
import type { full as FullSdk } from '@audius/sdk' | ||
import type { PageContextServer } from 'vike/types' | ||
|
||
import { audiusSdk } from '../sdk' | ||
|
||
export type CollectionPageProps = { | ||
collection: Maybe<FullSdk.PlaylistFull> | ||
} | ||
|
||
export async function onBeforeRender(pageContext: PageContextServer) { | ||
const { handle, slug } = pageContext.routeParams | ||
|
||
try { | ||
// NOTE: This is the playlist api, but works for both albums and playlists | ||
const { data: collections } = | ||
await audiusSdk.full.playlists.getPlaylistByHandleAndSlug({ | ||
handle, | ||
slug | ||
}) | ||
const collection = collections?.[0] | ||
|
||
return { | ||
pageContext: { | ||
pageProps: { | ||
collection | ||
} | ||
} | ||
} | ||
} catch (e) { | ||
console.error( | ||
'Error fetching collection for collection page SSR', | ||
'handle', | ||
handle, | ||
'slug', | ||
slug, | ||
'error', | ||
e | ||
) | ||
return { | ||
pageContext: { | ||
pageProps: {} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.