From 8f495d830235f60a6aefc8c2e0ad058b7e33f847 Mon Sep 17 00:00:00 2001 From: Matchu Date: Thu, 13 May 2021 17:35:50 -0700 Subject: [PATCH] Move getVisibleLayers to a new `shared` directory This folder will include code shared by both the client-side app and the server! The server isn't using it yet, but it will in a new API endpoint soon! I'm doing this in a separate commit to avoid lumping all the import-change noise into that commit. --- src/app/WardrobePage/OutfitKnownGlitchesBadge.js | 2 +- src/app/WardrobePage/PosePicker.js | 2 +- src/app/components/OutfitThumbnail.js | 2 +- src/app/components/useOutfitAppearance.js | 2 +- src/{app/components => shared}/getVisibleLayers.js | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename src/{app/components => shared}/getVisibleLayers.js (100%) diff --git a/src/app/WardrobePage/OutfitKnownGlitchesBadge.js b/src/app/WardrobePage/OutfitKnownGlitchesBadge.js index d48c98b..51d3085 100644 --- a/src/app/WardrobePage/OutfitKnownGlitchesBadge.js +++ b/src/app/WardrobePage/OutfitKnownGlitchesBadge.js @@ -3,7 +3,7 @@ import { Box, VStack } from "@chakra-ui/react"; import { WarningTwoIcon } from "@chakra-ui/icons"; import { FaBug } from "react-icons/fa"; import { GlitchBadgeLayout, layerUsesHTML5 } from "../components/HTML5Badge"; -import getVisibleLayers from "../components/getVisibleLayers"; +import getVisibleLayers from "../../shared/getVisibleLayers"; function OutfitKnownGlitchesBadge({ appearance }) { const glitchMessages = []; diff --git a/src/app/WardrobePage/PosePicker.js b/src/app/WardrobePage/PosePicker.js index b2d96f5..8d79b42 100644 --- a/src/app/WardrobePage/PosePicker.js +++ b/src/app/WardrobePage/PosePicker.js @@ -19,7 +19,7 @@ import { import { loadable } from "../util"; import { petAppearanceFragment } from "../components/useOutfitAppearance"; -import getVisibleLayers from "../components/getVisibleLayers"; +import getVisibleLayers from "../../shared/getVisibleLayers"; import { OutfitLayers } from "../components/OutfitPreview"; import SupportOnly from "./support/SupportOnly"; import useSupport from "./support/useSupport"; diff --git a/src/app/components/OutfitThumbnail.js b/src/app/components/OutfitThumbnail.js index fa01e4d..159da64 100644 --- a/src/app/components/OutfitThumbnail.js +++ b/src/app/components/OutfitThumbnail.js @@ -5,7 +5,7 @@ import gql from "graphql-tag"; import getVisibleLayers, { petAppearanceFragmentForGetVisibleLayers, itemAppearanceFragmentForGetVisibleLayers, -} from "./getVisibleLayers"; +} from "../../shared/getVisibleLayers"; function OutfitThumbnail({ petAppearance, itemAppearances, ...props }) { return ( diff --git a/src/app/components/useOutfitAppearance.js b/src/app/components/useOutfitAppearance.js index 03adb81..f0fe14b 100644 --- a/src/app/components/useOutfitAppearance.js +++ b/src/app/components/useOutfitAppearance.js @@ -4,7 +4,7 @@ import { useQuery } from "@apollo/client"; import getVisibleLayers, { itemAppearanceFragmentForGetVisibleLayers, petAppearanceFragmentForGetVisibleLayers, -} from "./getVisibleLayers"; +} from "../../shared/getVisibleLayers"; /** * useOutfitAppearance downloads the outfit's appearance data, and returns diff --git a/src/app/components/getVisibleLayers.js b/src/shared/getVisibleLayers.js similarity index 100% rename from src/app/components/getVisibleLayers.js rename to src/shared/getVisibleLayers.js