Implemented sorted graph
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
border: 1px solid white;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
height: fit-content;
|
||||
}
|
||||
|
||||
.amount {
|
||||
|
||||
@@ -6,6 +6,7 @@ import styles from "./GroupBox.module.css"
|
||||
import {EntitySpan} from "../EntitySpan/EntitySpan";
|
||||
import {useGroups} from "../../contexts/GroupProvider";
|
||||
import {calculateInputs} from "../../../src/calculateInputs";
|
||||
import {uniquify} from "../../../src/utils";
|
||||
|
||||
interface Props {
|
||||
group: Group
|
||||
@@ -44,8 +45,8 @@ const GroupBoxBase: FC<Props> = ({ group }) => {
|
||||
}, [exports, malls, ignoredFactories, baseFactories, findFactory, exportedFactories])
|
||||
|
||||
const [suggestionsExport, suggestionMall] = useMemo<[EnrichedEntity[], EnrichedEntity[]]>(() => {
|
||||
const selectedValues = Array.from(new Set([...exports, ...malls]))
|
||||
const availableIngredients = Array.from(new Set([...selectedValues, ...intermediates, ...inputs]))
|
||||
const selectedValues = uniquify([...exports, ...malls])
|
||||
const availableIngredients = uniquify([...selectedValues, ...intermediates, ...inputs])
|
||||
return factories
|
||||
.filter(factory => {
|
||||
if (!factory.recipe) return false
|
||||
|
||||
Reference in New Issue
Block a user