Files
CT/src/Views/Objects/allObjectsView.tsx
T

25 lines
641 B
TypeScript
Raw Normal View History

2024-07-11 18:54:56 +02:00
import * as React from "bloatless-react";
import { Chat, MessageObject } from "../../Model/chatModel";
2024-07-11 22:35:46 +02:00
import { ObjectGridView } from "./objectGridView";
2024-07-11 18:54:56 +02:00
import { translation } from "../../translations";
export function AllObjectsView(
chat: Chat,
selectedObject: React.State<MessageObject | undefined>,
isShowingObjectModal: React.State<boolean>
) {
2024-07-11 22:35:46 +02:00
const content = React.createProxyState([chat.objects], () =>
ObjectGridView(
2024-07-11 22:27:15 +02:00
chat,
2024-07-11 22:35:46 +02:00
chat.objects,
2024-07-11 22:27:15 +02:00
selectedObject,
2024-07-11 22:35:46 +02:00
isShowingObjectModal,
translation.noObjects
2024-07-11 18:54:56 +02:00
)
);
return <div class="width-100 height-100" children:set={content}></div>;
}