Bundle Copy

This commit is contained in:
ItsSelis
2023-05-23 17:43:01 +02:00
parent 8aad48f508
commit 3da68ee1b6
420 changed files with 47669 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
import { sortBy } from 'common/collections';
import { useBackend } from '../backend';
import { Button, Section } from '../components';
import { Window } from '../layouts';
export const FileCabinet = (props, context) => {
const { act, data } = useBackend(context);
const { contents } = data;
// Wow, the filing cabinets sort themselves in 2320.
const sortedContents = sortBy((val) => val.name)(contents || []);
return (
<Window width={350} height={300} resizable>
<Window.Content scrollable>
<Section>
{sortedContents.map((item) => (
<Button
key={item.ref}
fluid
icon="file"
content={item.name}
onClick={() => act('retrieve', { ref: item.ref })}
/>
))}
</Section>
</Window.Content>
</Window>
);
};