mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-06-30 16:40:05 +08:00
Ensure FlaggableElement has an empty list of labels in the messages views
This commit is contained in:
@@ -64,7 +64,7 @@ export function MessageWithChildren(props: MessageWithChildrenProps) {
|
||||
<Flex justifyContent="center" pb="2">
|
||||
<Box maxWidth="container.sm" flex="1" px={isFirstOrOnly ? [4, 6, 8, 9] : "0"}>
|
||||
<Box px={isFirstOrOnly ? "2" : "0"}>
|
||||
<MessageTableEntry item={message} idx={1} />
|
||||
<MessageTableEntry item={message} idx={1} valid_labels={[]} />
|
||||
</Box>
|
||||
</Box>
|
||||
</Flex>
|
||||
@@ -90,7 +90,7 @@ export function MessageWithChildren(props: MessageWithChildrenProps) {
|
||||
<HStack {...MessageStackProps}>
|
||||
{children.map((item, idx) => (
|
||||
<Box maxWidth="container.sm" flex="1" key={`recursiveMessageWChildren_${idx}`}>
|
||||
<MessageTableEntry item={item} idx={idx * 2} />
|
||||
<MessageTableEntry item={item} idx={idx * 2} valid_labels={[]} />
|
||||
</Box>
|
||||
))}
|
||||
</HStack>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useState } from "react";
|
||||
import type { ValidLabel } from "src/components/Messages";
|
||||
import fetcher from "src/lib/fetcher";
|
||||
import poster from "src/lib/poster";
|
||||
import useSWRImmutable from "swr/immutable";
|
||||
@@ -10,6 +11,7 @@ export interface TaskResponse<TaskType> {
|
||||
id: string;
|
||||
userId: string;
|
||||
task: TaskType;
|
||||
valid_labels: ValidLabel[];
|
||||
}
|
||||
|
||||
export const useGenericTaskAPI = <TaskType,>(taskApiEndpoint: string) => {
|
||||
|
||||
@@ -41,7 +41,7 @@ const MessageDetail = ({ id }) => {
|
||||
Parent
|
||||
</Text>
|
||||
<Box rounded="lg" p="2">
|
||||
<MessageTableEntry item={parent} idx={1} />
|
||||
<MessageTableEntry item={parent} idx={1} valid_labels={[]} />
|
||||
</Box>
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -52,7 +52,11 @@ const MessagesDashboard = () => {
|
||||
borderRadius="xl"
|
||||
className="p-6 shadow-sm"
|
||||
>
|
||||
{receivedMessages ? <MessageTable messages={messages} /> : <CircularProgress isIndeterminate />}
|
||||
{receivedMessages ? (
|
||||
<MessageTable messages={messages} valid_labels={[]} />
|
||||
) : (
|
||||
<CircularProgress isIndeterminate />
|
||||
)}
|
||||
</Box>
|
||||
</Box>
|
||||
<Box>
|
||||
@@ -66,7 +70,11 @@ const MessagesDashboard = () => {
|
||||
borderRadius="xl"
|
||||
className="p-6 shadow-sm"
|
||||
>
|
||||
{receivedUserMessages ? <MessageTable messages={userMessages} /> : <CircularProgress isIndeterminate />}
|
||||
{receivedUserMessages ? (
|
||||
<MessageTable messages={userMessages} valid_labels={[]} />
|
||||
) : (
|
||||
<CircularProgress isIndeterminate />
|
||||
)}
|
||||
</Box>
|
||||
</Box>
|
||||
</SimpleGrid>
|
||||
|
||||
Reference in New Issue
Block a user