@@ -27,7 +27,7 @@ import {
2727} from "@/components/ui/dialog" ;
2828
2929import { useMultiSelect } from "@/contexts/multi-select-context" ;
30- import { Stardrop , IslandUpgradeMail } from "@/lib/parsers/general" ;
30+ import { IslandUpgradeMail , Stardrop } from "@/lib/parsers/general" ;
3131import { ChevronRightIcon } from "@radix-ui/react-icons" ;
3232
3333interface Props {
@@ -36,7 +36,14 @@ interface Props {
3636 iconURL : string ;
3737 completed ?: boolean ;
3838 _id : string ;
39- _type : "stardrop" | "note" | "scrap" | "walnut" | "power" | "rarecrow" | "island_upgrade" ;
39+ _type :
40+ | "stardrop"
41+ | "note"
42+ | "scrap"
43+ | "walnut"
44+ | "power"
45+ | "rarecrow"
46+ | "island_upgrade" ;
4047 /**
4148 * Whether the user prefers to see new content
4249 *
@@ -134,21 +141,20 @@ export const DialogCard = ({
134141 case "power" :
135142 let powers = new Set ( activePlayer ?. powers ?. collection ?? [ ] ) ;
136143
137- console . log ( "initial powers:" , powers ) ;
138-
139144 if ( status ) powers . add ( _id ) ;
140145 else powers . delete ( _id ) ;
141146
142- console . log ( "final powers:" , powers ) ;
143-
144147 patch = {
145148 powers : {
146149 collection : Array . from ( powers ) ,
147150 } ,
148151 } ;
152+ break ;
149153
150154 case "island_upgrade" :
151- const islandUpgrades = new Set ( activePlayer . general ?. islandUpgrades ?? [ ] ) ;
155+ const islandUpgrades = new Set (
156+ activePlayer . general ?. islandUpgrades ?? [ ] ,
157+ ) ;
152158 if ( status ) islandUpgrades . add ( _id as IslandUpgradeMail ) ;
153159 else islandUpgrades . delete ( _id as IslandUpgradeMail ) ;
154160
0 commit comments