Fix focal share links
This commit is contained in:
parent
bcc1410069
commit
0d2f223ed8
@ -119,10 +119,10 @@ export const pathForPhoto = ({
|
||||
? `${pathForCamera(camera)}/${getPhotoId(photo)}`
|
||||
: simulation
|
||||
? `${pathForFilmSimulation(simulation)}/${getPhotoId(photo)}`
|
||||
: focal
|
||||
? `${pathForFocalLength(focal)}/${getPhotoId(photo)}`
|
||||
: recipe
|
||||
? `${pathForRecipe(recipe)}/${getPhotoId(photo)}`
|
||||
: recipe
|
||||
? `${pathForRecipe(recipe)}/${getPhotoId(photo)}`
|
||||
: focal
|
||||
? `${pathForFocalLength(focal)}/${getPhotoId(photo)}`
|
||||
: `${PREFIX_PHOTO}/${getPhotoId(photo)}`;
|
||||
|
||||
export const pathForTag = (tag: string) =>
|
||||
|
||||
@ -123,6 +123,7 @@ export default function PhotoDetailPage({
|
||||
shouldShareCamera={camera !== undefined}
|
||||
shouldShareSimulation={simulation !== undefined}
|
||||
shouldShareRecipe={recipe !== undefined}
|
||||
shouldShareFocalLength={focal !== undefined}
|
||||
includeFavoriteInAdminMenu={includeFavoriteInAdminMenu}
|
||||
/>,
|
||||
]}
|
||||
|
||||
@ -113,8 +113,8 @@ export interface PhotoSetCategory {
|
||||
tag?: string
|
||||
camera?: Camera
|
||||
simulation?: FilmSimulation
|
||||
focal?: number
|
||||
recipe?: string
|
||||
focal?: number
|
||||
lens?: Lens // Unimplemented as a set
|
||||
}
|
||||
|
||||
|
||||
@ -24,19 +24,26 @@ export default function ShareModals() {
|
||||
} = shareModalProps;
|
||||
|
||||
if (photo) {
|
||||
return <PhotoShareModal {...{photo, tag, camera, simulation, focal}} />;
|
||||
return <PhotoShareModal {...{
|
||||
photo,
|
||||
tag,
|
||||
camera,
|
||||
simulation,
|
||||
recipe,
|
||||
focal,
|
||||
}} />;
|
||||
} else if (photos) {
|
||||
const attributes = {photos, count, dateRange};
|
||||
if (tag) {
|
||||
return <TagShareModal {...{tag, ...attributes}} />;
|
||||
return <TagShareModal {...{ tag, ...attributes }} />;
|
||||
} else if (camera) {
|
||||
return <CameraShareModal {...{camera, ...attributes}} />;
|
||||
return <CameraShareModal {...{ camera, ...attributes }} />;
|
||||
} else if (simulation) {
|
||||
return <FilmSimulationShareModal {...{simulation, ...attributes}} />;
|
||||
} else if (focal !== undefined) {
|
||||
return <FocalLengthShareModal {...{focal, ...attributes}} />;
|
||||
return <FilmSimulationShareModal {...{ simulation, ...attributes }} />;
|
||||
} else if (recipe) {
|
||||
return <RecipeShareModal {...{recipe, ...attributes}} />;
|
||||
}
|
||||
return <RecipeShareModal {...{ recipe, ...attributes }} />;
|
||||
} else if (focal !== undefined) {
|
||||
return <FocalLengthShareModal {...{ focal, ...attributes }} />;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user