Fix bulk-add layers tool
Oops, we extracted Support fields out from the default `appearanceLayerFragment`! This was causing the page to silently fail to show any changes, because `layer.remoteId` was evaluating to `undefined` rather than one of the ID numbers in the range. Here, I've added both `remoteId` explictly because we use it directly, and also the support fields because that's what the layer support UI needs!
This commit is contained in:
parent
3a4e5d7e13
commit
6918b3cefa
2 changed files with 5 additions and 1 deletions
|
@ -19,6 +19,7 @@ import {
|
||||||
import { gql, useMutation, useQuery } from "@apollo/client";
|
import { gql, useMutation, useQuery } from "@apollo/client";
|
||||||
import {
|
import {
|
||||||
appearanceLayerFragment,
|
appearanceLayerFragment,
|
||||||
|
appearanceLayerFragmentForSupport,
|
||||||
itemAppearanceFragment,
|
itemAppearanceFragment,
|
||||||
petAppearanceFragment,
|
petAppearanceFragment,
|
||||||
} from "../../components/useOutfitAppearance";
|
} from "../../components/useOutfitAppearance";
|
||||||
|
@ -246,7 +247,9 @@ function AllItemLayersSupportModalContent({
|
||||||
remoteIds: $layerRemoteIds
|
remoteIds: $layerRemoteIds
|
||||||
) {
|
) {
|
||||||
id
|
id
|
||||||
|
remoteId
|
||||||
...AppearanceLayerForOutfitPreview
|
...AppearanceLayerForOutfitPreview
|
||||||
|
...AppearanceLayerForSupport
|
||||||
}
|
}
|
||||||
|
|
||||||
color(id: $colorId) {
|
color(id: $colorId) {
|
||||||
|
@ -281,6 +284,7 @@ function AllItemLayersSupportModalContent({
|
||||||
}
|
}
|
||||||
|
|
||||||
${appearanceLayerFragment}
|
${appearanceLayerFragment}
|
||||||
|
${appearanceLayerFragmentForSupport}
|
||||||
${petAppearanceFragment}
|
${petAppearanceFragment}
|
||||||
`,
|
`,
|
||||||
{
|
{
|
||||||
|
|
|
@ -226,7 +226,7 @@ export const appearanceLayerFragment = gql`
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const appearanceLayerFragmentForSupport = gql`
|
export const appearanceLayerFragmentForSupport = gql`
|
||||||
fragment AppearanceLayerForSupport on AppearanceLayer {
|
fragment AppearanceLayerForSupport on AppearanceLayer {
|
||||||
id
|
id
|
||||||
remoteId # HACK: This is for Support tools, but other views don't need it
|
remoteId # HACK: This is for Support tools, but other views don't need it
|
||||||
|
|
Loading…
Reference in a new issue