test commit

This commit is contained in:
Kirill
2026-05-15 21:14:07 +05:00
parent 518879dabb
commit 2db6258b33
2 changed files with 10 additions and 5 deletions
@@ -11,6 +11,13 @@ import { uploadAdminProductImages } from '@/entities/product/api/product-api'
import { formatAdminImageMaxSizeHint } from '@/shared/constants/upload-limits' import { formatAdminImageMaxSizeHint } from '@/shared/constants/upload-limits'
import { invalidateQueryKeys } from '@/shared/lib/invalidate-query-keys' import { invalidateQueryKeys } from '@/shared/lib/invalidate-query-keys'
import { GallerySliderSection } from './GallerySliderSection' import { GallerySliderSection } from './GallerySliderSection'
import type { AxiosError } from 'axios'
function getApiErrorMessage(error: unknown): string | null {
const e = error as AxiosError<{ error?: string }>
const msg = e?.response?.data?.error
return msg ? String(msg) : null
}
export function AdminGalleryPage() { export function AdminGalleryPage() {
const queryClient = useQueryClient() const queryClient = useQueryClient()
@@ -105,9 +112,7 @@ export function AdminGalleryPage() {
</Typography> </Typography>
)} )}
{deleteMut.isError && ( {deleteMut.isError && (
<Typography color="error"> <Typography color="error">{getApiErrorMessage(deleteMut.error) ?? 'Ошибка удаления'}</Typography>
{deleteMut.error instanceof Error ? deleteMut.error.message : 'Ошибка удаления'}
</Typography>
)} )}
</Stack> </Stack>
+2 -2
View File
@@ -117,7 +117,7 @@ else
fi fi
echo ">>> Diff: $LAST_DEPLOYED..HEAD" echo ">>> Diff: $LAST_DEPLOYED..HEAD"
CHANGED_FILES=$(git -C "$ROOT" diff --name-only "$LAST_DEPLOYED" HEAD 2>/dev/null || true) CHANGED_FILES=$(cd "$ROOT" && git diff --name-only "$LAST_DEPLOYED" HEAD 2>/dev/null || true)
if echo "$CHANGED_FILES" | grep -q "^client/"; then if echo "$CHANGED_FILES" | grep -q "^client/"; then
changed_client=true changed_client=true
@@ -207,7 +207,7 @@ fi
# --- Save deployed commit --- # --- Save deployed commit ---
if [[ "$TARGET" == "auto" && "$FORCE" != true ]]; then if [[ "$TARGET" == "auto" && "$FORCE" != true ]]; then
CURRENT_HEAD=$(git -C "$ROOT" rev-parse HEAD) CURRENT_HEAD=$(cd "$ROOT" && git rev-parse HEAD)
echo "$CURRENT_HEAD" > "$ROOT/.deployed-commit" echo "$CURRENT_HEAD" > "$ROOT/.deployed-commit"
echo ">>> Сохранён коммит $CURRENT_HEAD" echo ">>> Сохранён коммит $CURRENT_HEAD"
fi fi