All SmartFridge Contents are Now Alphabetized (#22477)

* god damn i hate JS

* Update tgui.bundle.js

* Update tgui.bundle.js
This commit is contained in:
matttheficus
2023-09-25 18:54:00 -04:00
committed by GitHub
parent 25aa5aa2d3
commit a0e021a04c
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -40,7 +40,10 @@ export const Smartfridge = (props, context) => {
<Section title="Contents">
{!contents && <Box color="average"> No products loaded. </Box>}
{!!contents &&
contents.map((item) => {
contents
.slice()
.sort((a, b) => a.display_name.localeCompare(b.display_name))
.map((item) => {
return (
<Flex direction="row" key={item}>
<Flex.Item width="45%">{item.display_name}</Flex.Item>
File diff suppressed because one or more lines are too long