test commit
This commit is contained in:
@@ -11,6 +11,13 @@ import { uploadAdminProductImages } from '@/entities/product/api/product-api'
|
||||
import { formatAdminImageMaxSizeHint } from '@/shared/constants/upload-limits'
|
||||
import { invalidateQueryKeys } from '@/shared/lib/invalidate-query-keys'
|
||||
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() {
|
||||
const queryClient = useQueryClient()
|
||||
@@ -105,9 +112,7 @@ export function AdminGalleryPage() {
|
||||
</Typography>
|
||||
)}
|
||||
{deleteMut.isError && (
|
||||
<Typography color="error">
|
||||
{deleteMut.error instanceof Error ? deleteMut.error.message : 'Ошибка удаления'}
|
||||
</Typography>
|
||||
<Typography color="error">{getApiErrorMessage(deleteMut.error) ?? 'Ошибка удаления'}</Typography>
|
||||
)}
|
||||
</Stack>
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ else
|
||||
fi
|
||||
|
||||
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
|
||||
changed_client=true
|
||||
@@ -207,7 +207,7 @@ fi
|
||||
|
||||
# --- Save deployed commit ---
|
||||
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"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user