Release the Shopping List button to everyone
Deleting the feature-flag code to gate it, it just now always appears! Happy launch day!
This commit is contained in:
parent
c55f71a000
commit
88836082f2
1 changed files with 1 additions and 23 deletions
|
@ -36,15 +36,8 @@ import {
|
||||||
} from "@chakra-ui/icons";
|
} from "@chakra-ui/icons";
|
||||||
import { IoBagCheck } from "react-icons/io5";
|
import { IoBagCheck } from "react-icons/io5";
|
||||||
import { CSSTransition, TransitionGroup } from "react-transition-group";
|
import { CSSTransition, TransitionGroup } from "react-transition-group";
|
||||||
import { useSearchParams } from "react-router-dom";
|
|
||||||
|
|
||||||
import {
|
import { Delay, ErrorMessage, Heading1, Heading2 } from "../util";
|
||||||
Delay,
|
|
||||||
ErrorMessage,
|
|
||||||
Heading1,
|
|
||||||
Heading2,
|
|
||||||
useLocalStorage,
|
|
||||||
} from "../util";
|
|
||||||
import Item, { ItemListContainer, ItemListSkeleton } from "./Item";
|
import Item, { ItemListContainer, ItemListSkeleton } from "./Item";
|
||||||
import { BiRename } from "react-icons/bi";
|
import { BiRename } from "react-icons/bi";
|
||||||
import { IoCloudUploadOutline } from "react-icons/io5";
|
import { IoCloudUploadOutline } from "react-icons/io5";
|
||||||
|
@ -284,21 +277,6 @@ function ItemZoneGroupSkeleton({ itemCount }) {
|
||||||
* this is disabled.
|
* this is disabled.
|
||||||
*/
|
*/
|
||||||
function ShoppingListButton({ outfitState }) {
|
function ShoppingListButton({ outfitState }) {
|
||||||
const [searchParams] = useSearchParams();
|
|
||||||
const [isVisible, setIsVisible] = useLocalStorage("DTIShowGetTheseItems");
|
|
||||||
|
|
||||||
// Enable this feature by visiting `/outfits/new?features=get-these-items`.
|
|
||||||
React.useEffect(() => {
|
|
||||||
const features = searchParams.get("features") ?? "";
|
|
||||||
if (features.split(",").includes("get-these-items")) {
|
|
||||||
setIsVisible(true);
|
|
||||||
}
|
|
||||||
}, [searchParams, setIsVisible]);
|
|
||||||
|
|
||||||
if (!isVisible) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
const itemIds = [...outfitState.wornItemIds].sort();
|
const itemIds = [...outfitState.wornItemIds].sort();
|
||||||
const isDisabled = itemIds.length === 0;
|
const isDisabled = itemIds.length === 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue