Fix share tile client/server status
This commit is contained in:
parent
b564d2f6e8
commit
0e9247f3c5
@ -3,9 +3,9 @@ import { absolutePathForCameraImage, pathForCamera } from '@/app/paths';
|
||||
import OGTile, { OGLoadingState } from '@/components/OGTile';
|
||||
import { Camera } from '.';
|
||||
import { descriptionForCameraPhotos, titleForCamera } from './meta';
|
||||
import { getAppText } from '@/i18n/state/server';
|
||||
import { useAppText } from '@/i18n/state/client';
|
||||
|
||||
export default async function CameraOGTile({
|
||||
export default function CameraOGTile({
|
||||
camera,
|
||||
photos,
|
||||
loadingState: loadingStateExternal,
|
||||
@ -26,7 +26,7 @@ export default async function CameraOGTile({
|
||||
count?: number
|
||||
dateRange?: PhotoDateRange
|
||||
}) {
|
||||
const appText = await getAppText();
|
||||
const appText = useAppText();
|
||||
return (
|
||||
<OGTile {...{
|
||||
title: titleForCamera(camera, photos, appText, count),
|
||||
|
||||
@ -4,9 +4,9 @@ import ShareModal from '@/share/ShareModal';
|
||||
import CameraOGTile from './CameraOGTile';
|
||||
import { Camera, formatCameraText } from '.';
|
||||
import { shareTextForCamera } from './meta';
|
||||
import { getAppText } from '@/i18n/state/server';
|
||||
import { useAppText } from '@/i18n/state/client';
|
||||
|
||||
export default async function CameraShareModal({
|
||||
export default function CameraShareModal({
|
||||
camera,
|
||||
photos,
|
||||
count,
|
||||
@ -14,7 +14,7 @@ export default async function CameraShareModal({
|
||||
}: {
|
||||
camera: Camera
|
||||
} & PhotoSetAttributes) {
|
||||
const appText = await getAppText();
|
||||
const appText = useAppText();
|
||||
return (
|
||||
<ShareModal
|
||||
pathShare={absolutePathForCamera(camera, true)}
|
||||
|
||||
@ -5,9 +5,9 @@ import {
|
||||
} from '@/app/paths';
|
||||
import OGTile, { OGLoadingState } from '@/components/OGTile';
|
||||
import { descriptionForFilmPhotos, titleForFilm } from '.';
|
||||
import { getAppText } from '@/i18n/state/server';
|
||||
import { useAppText } from '@/i18n/state/client';
|
||||
|
||||
export default async function FilmOGTile({
|
||||
export default function FilmOGTile({
|
||||
film,
|
||||
photos,
|
||||
loadingState: loadingStateExternal,
|
||||
@ -28,7 +28,7 @@ export default async function FilmOGTile({
|
||||
count?: number
|
||||
dateRange?: PhotoDateRange
|
||||
}) {
|
||||
const appText = await getAppText();
|
||||
const appText = useAppText();
|
||||
return (
|
||||
<OGTile {...{
|
||||
title: titleForFilm(film, photos, appText, count),
|
||||
|
||||
@ -3,9 +3,9 @@ import { PhotoSetAttributes } from '../category';
|
||||
import ShareModal from '@/share/ShareModal';
|
||||
import FilmOGTile from './FilmOGTile';
|
||||
import { labelForFilm, shareTextForFilm } from '.';
|
||||
import { getAppText } from '@/i18n/state/server';
|
||||
import { useAppText } from '@/i18n/state/client';
|
||||
|
||||
export default async function FilmShareModal({
|
||||
export default function FilmShareModal({
|
||||
film,
|
||||
photos,
|
||||
count,
|
||||
@ -13,7 +13,7 @@ export default async function FilmShareModal({
|
||||
}: {
|
||||
film: string
|
||||
} & PhotoSetAttributes) {
|
||||
const appText = await getAppText();
|
||||
const appText = useAppText();
|
||||
return (
|
||||
<ShareModal
|
||||
pathShare={absolutePathForFilm(film, true)}
|
||||
|
||||
@ -5,9 +5,9 @@ import {
|
||||
} from '@/app/paths';
|
||||
import OGTile, { OGLoadingState } from '@/components/OGTile';
|
||||
import { descriptionForFocalLengthPhotos, titleForFocalLength } from '.';
|
||||
import { getAppText } from '@/i18n/state/server';
|
||||
import { useAppText } from '@/i18n/state/client';
|
||||
|
||||
export default async function FocalLengthOGTile({
|
||||
export default function FocalLengthOGTile({
|
||||
focal,
|
||||
photos,
|
||||
loadingState: loadingStateExternal,
|
||||
@ -28,7 +28,7 @@ export default async function FocalLengthOGTile({
|
||||
count?: number
|
||||
dateRange?: PhotoDateRange
|
||||
}) {
|
||||
const appText = await getAppText();
|
||||
const appText = useAppText();
|
||||
return (
|
||||
<OGTile {...{
|
||||
title: titleForFocalLength(focal, photos, appText, count),
|
||||
|
||||
@ -3,9 +3,9 @@ import { PhotoSetAttributes } from '../category';
|
||||
import ShareModal from '@/share/ShareModal';
|
||||
import FocalLengthOGTile from './FocalLengthOGTile';
|
||||
import { formatFocalLengthSafe, shareTextFocalLength } from '.';
|
||||
import { getAppText } from '@/i18n/state/server';
|
||||
import { useAppText } from '@/i18n/state/client';
|
||||
|
||||
export default async function FocalLengthShareModal({
|
||||
export default function FocalLengthShareModal({
|
||||
focal,
|
||||
photos,
|
||||
count,
|
||||
@ -13,7 +13,7 @@ export default async function FocalLengthShareModal({
|
||||
}: {
|
||||
focal: number
|
||||
} & PhotoSetAttributes) {
|
||||
const appText = await getAppText();
|
||||
const appText = useAppText();
|
||||
return (
|
||||
<ShareModal
|
||||
pathShare={absolutePathForFocalLength(focal, true)}
|
||||
|
||||
@ -3,9 +3,9 @@ import { absolutePathForLensImage, pathForLens } from '@/app/paths';
|
||||
import OGTile, { OGLoadingState } from '@/components/OGTile';
|
||||
import { Lens } from '.';
|
||||
import { titleForLens, descriptionForLensPhotos } from './meta';
|
||||
import { getAppText } from '@/i18n/state/server';
|
||||
import { useAppText } from '@/i18n/state/client';
|
||||
|
||||
export default async function LensOGTile({
|
||||
export default function LensOGTile({
|
||||
lens,
|
||||
photos,
|
||||
loadingState: loadingStateExternal,
|
||||
@ -26,7 +26,7 @@ export default async function LensOGTile({
|
||||
count?: number
|
||||
dateRange?: PhotoDateRange
|
||||
}) {
|
||||
const appText = await getAppText();
|
||||
const appText = useAppText();
|
||||
return (
|
||||
<OGTile {...{
|
||||
title: titleForLens(lens, photos, appText, count),
|
||||
|
||||
@ -4,9 +4,9 @@ import ShareModal from '@/share/ShareModal';
|
||||
import { formatLensText, Lens } from '.';
|
||||
import { shareTextForLens } from './meta';
|
||||
import LensOGTile from './LensOGTile';
|
||||
import { getAppText } from '@/i18n/state/server';
|
||||
import { useAppText } from '@/i18n/state/client';
|
||||
|
||||
export default async function LensShareModal({
|
||||
export default function LensShareModal({
|
||||
lens,
|
||||
photos,
|
||||
count,
|
||||
@ -14,7 +14,7 @@ export default async function LensShareModal({
|
||||
}: {
|
||||
lens: Lens
|
||||
} & PhotoSetAttributes) {
|
||||
const appText = await getAppText();
|
||||
const appText = useAppText();
|
||||
return (
|
||||
<ShareModal
|
||||
pathShare={absolutePathForLens(lens, true)}
|
||||
|
||||
@ -2,9 +2,9 @@ import { Photo, PhotoDateRange } from '@/photo';
|
||||
import { absolutePathForRecipeImage, pathForRecipe } from '@/app/paths';
|
||||
import OGTile, { OGLoadingState } from '@/components/OGTile';
|
||||
import { descriptionForRecipePhotos, titleForRecipe } from '.';
|
||||
import { getAppText } from '@/i18n/state/server';
|
||||
import { useAppText } from '@/i18n/state/client';
|
||||
|
||||
export default async function RecipeOGTile({
|
||||
export default function RecipeOGTile({
|
||||
recipe,
|
||||
photos,
|
||||
loadingState: loadingStateExternal,
|
||||
@ -25,7 +25,7 @@ export default async function RecipeOGTile({
|
||||
count?: number
|
||||
dateRange?: PhotoDateRange
|
||||
}) {
|
||||
const appText = await getAppText();
|
||||
const appText = useAppText();
|
||||
return (
|
||||
<OGTile {...{
|
||||
title: titleForRecipe(recipe, photos, appText, count),
|
||||
|
||||
@ -8,9 +8,9 @@ import {
|
||||
generateRecipeText,
|
||||
} from '.';
|
||||
import RecipeOGTile from './RecipeOGTile';
|
||||
import { getAppText } from '@/i18n/state/server';
|
||||
import { useAppText } from '@/i18n/state/client';
|
||||
|
||||
export default async function RecipeShareModal({
|
||||
export default function RecipeShareModal({
|
||||
recipe,
|
||||
photos,
|
||||
count,
|
||||
@ -24,7 +24,7 @@ export default async function RecipeShareModal({
|
||||
? generateRecipeText({ data, film })
|
||||
: undefined;
|
||||
|
||||
const appText = await getAppText();
|
||||
const appText = useAppText();
|
||||
|
||||
return (
|
||||
<ShareModal
|
||||
|
||||
@ -2,9 +2,9 @@ import { Photo, PhotoDateRange } from '@/photo';
|
||||
import { absolutePathForTagImage, pathForTag } from '@/app/paths';
|
||||
import OGTile, { OGLoadingState } from '@/components/OGTile';
|
||||
import { descriptionForTaggedPhotos, titleForTag } from '.';
|
||||
import { getAppText } from '@/i18n/state/server';
|
||||
import { useAppText } from '@/i18n/state/client';
|
||||
|
||||
export default async function TagOGTile({
|
||||
export default function TagOGTile({
|
||||
tag,
|
||||
photos,
|
||||
loadingState: loadingStateExternal,
|
||||
@ -25,7 +25,7 @@ export default async function TagOGTile({
|
||||
count?: number
|
||||
dateRange?: PhotoDateRange
|
||||
}) {
|
||||
const appText = await getAppText();
|
||||
const appText = useAppText();
|
||||
return (
|
||||
<OGTile {...{
|
||||
title: titleForTag(tag, photos, appText, count),
|
||||
|
||||
@ -3,9 +3,9 @@ import { PhotoSetAttributes } from '../category';
|
||||
import ShareModal from '@/share/ShareModal';
|
||||
import TagOGTile from './TagOGTile';
|
||||
import { formatTag, shareTextForTag } from '.';
|
||||
import { getAppText } from '@/i18n/state/server';
|
||||
import { useAppText } from '@/i18n/state/client';
|
||||
|
||||
export default async function TagShareModal({
|
||||
export default function TagShareModal({
|
||||
tag,
|
||||
photos,
|
||||
count,
|
||||
@ -13,7 +13,7 @@ export default async function TagShareModal({
|
||||
}: {
|
||||
tag: string
|
||||
} & PhotoSetAttributes) {
|
||||
const appText = await getAppText();
|
||||
const appText = useAppText();
|
||||
return (
|
||||
<ShareModal
|
||||
pathShare={absolutePathForTag(tag, true)}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user