feat(web): permanent url in shared link ()

This commit is contained in:
Alex 2024-04-25 14:32:21 -05:00 committed by GitHub
parent adb607c3ee
commit 912d0c4d74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 6 additions and 34 deletions
web/src/lib/utils

View file

@ -18,8 +18,8 @@ export const isPeopleRoute = (route?: string | null) => !!route?.startsWith('/(u
export const isAssetViewerRoute = (target?: NavigationTarget | null) =>
!!(target?.route.id?.endsWith('/[[assetId=id]]') && 'assetId' in (target?.params || {}));
export function getAssetInfoFromParam({ assetId }: { assetId?: string }) {
return assetId && getAssetInfo({ id: assetId });
export function getAssetInfoFromParam({ assetId, key }: { assetId?: string; key?: string }) {
return assetId && getAssetInfo({ id: assetId, key });
}
function currentUrlWithoutAsset() {