remodel views to update dynamically

This commit is contained in:
marlon-erler
2024-07-12 19:04:57 +02:00
parent bb5550a8fe
commit 8697e7ad8b
7 changed files with 357 additions and 245 deletions
+4 -10
View File
@@ -3,21 +3,15 @@ import * as React from "bloatless-react";
import { Chat, MessageObject } from "../../Model/chatModel";
import { ObjectGridView } from "./objectGridView";
import { translation } from "../../translations";
export function AllObjectsView(
chat: Chat,
selectedObject: React.State<MessageObject | undefined>,
isShowingObjectModal: React.State<boolean>
) {
const content = React.createProxyState([chat.objects], () =>
ObjectGridView(
chat,
chat.objects,
selectedObject,
isShowingObjectModal
)
return (
<div class="width-100 height-100">
{ObjectGridView(chat, chat.objects, selectedObject, isShowingObjectModal)}
</div>
);
return <div class="width-100 height-100" children:set={content}></div>;
}