mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-07-04 17:20:19 +08:00
Merge pull request #478 from LAION-AI/cleanup-web-import-warnings
Fixing most of the eslint warnings in the web code
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
import { Button, useDisclosure } from "@chakra-ui/react";
|
||||
import { Modal, ModalOverlay, ModalContent, ModalHeader, ModalBody, ModalCloseButton } from "@chakra-ui/react";
|
||||
import {
|
||||
Button,
|
||||
Modal,
|
||||
ModalBody,
|
||||
ModalCloseButton,
|
||||
ModalContent,
|
||||
ModalHeader,
|
||||
ModalOverlay,
|
||||
useDisclosure,
|
||||
} from "@chakra-ui/react";
|
||||
import React from "react";
|
||||
|
||||
export const CollapsableText = ({ text, maxLength = 220 }) => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Box } from "@chakra-ui/react";
|
||||
import { Message } from "./Messages";
|
||||
import { Message } from "src/components/Messages";
|
||||
|
||||
export const ContextMessages = ({ messages }: { messages: Message[] }) => {
|
||||
return (
|
||||
|
||||
@@ -24,8 +24,8 @@ import {
|
||||
import { FlagIcon, QuestionMarkCircleIcon } from "@heroicons/react/20/solid";
|
||||
import { useState } from "react";
|
||||
import poster from "src/lib/poster";
|
||||
import useSWRMutation from "swr/mutation";
|
||||
import { colors } from "styles/Theme/colors";
|
||||
import useSWRMutation from "swr/mutation";
|
||||
|
||||
export const FlaggableElement = (props) => {
|
||||
const [isEditing, setIsEditing] = useBoolean();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Box, CircularProgress, Stack, StackDivider, useColorModeValue } from "@chakra-ui/react";
|
||||
import { MessageTableEntry } from "./MessageTableEntry";
|
||||
import { Stack, StackDivider } from "@chakra-ui/react";
|
||||
import { MessageTableEntry } from "src/components/Messages/MessageTableEntry";
|
||||
|
||||
export function MessageTable({ messages }) {
|
||||
return (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Avatar, Box, HStack, LinkBox, useColorModeValue } from "@chakra-ui/react";
|
||||
import { Avatar, HStack, LinkBox, useColorModeValue } from "@chakra-ui/react";
|
||||
import { boolean } from "boolean";
|
||||
import NextLink from "next/link";
|
||||
import { FlaggableElement } from "../FlaggableElement";
|
||||
import { FlaggableElement } from "src/components/FlaggableElement";
|
||||
|
||||
interface Message {
|
||||
text: string;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { Box, CircularProgress, Flex, HStack, StackDivider, Text, TextProps, StackProps } from "@chakra-ui/react";
|
||||
import { useState } from "react";
|
||||
import useSWR from "swr";
|
||||
|
||||
import fetcher from "src/lib/fetcher";
|
||||
import { MessageTableEntry } from "./MessageTableEntry";
|
||||
import { Box, CircularProgress, Flex, HStack, StackDivider, StackProps, Text, TextProps } from "@chakra-ui/react";
|
||||
import { boolean } from "boolean";
|
||||
import { useState } from "react";
|
||||
import { MessageTableEntry } from "src/components/Messages/MessageTableEntry";
|
||||
import fetcher from "src/lib/fetcher";
|
||||
import useSWR from "swr";
|
||||
|
||||
const MessageHeaderProps: TextProps = {
|
||||
align: "center",
|
||||
@@ -36,7 +35,7 @@ export function MessageWithChildren(props: MessageWithChildrenProps) {
|
||||
onSuccess: (data) => {
|
||||
setMessage(data);
|
||||
},
|
||||
onError: (err, key, config) => {
|
||||
onError: () => {
|
||||
setMessage(null);
|
||||
},
|
||||
});
|
||||
@@ -44,7 +43,7 @@ export function MessageWithChildren(props: MessageWithChildrenProps) {
|
||||
onSuccess: (data) => {
|
||||
setChildren(data);
|
||||
},
|
||||
onError: (err, key, config) => {
|
||||
onError: () => {
|
||||
setChildren(null);
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Box, useColorMode } from "@chakra-ui/react";
|
||||
import { MenuButtonOption, SideMenu } from "src/components/SideMenu";
|
||||
import { colors } from "styles/Theme/colors";
|
||||
import { SideMenu, MenuButtonOption } from "src/components/SideMenu";
|
||||
|
||||
interface SideMenuLayoutProps {
|
||||
menuButtonOptions: MenuButtonOption[];
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
ModalOverlay,
|
||||
useDisclosure,
|
||||
} from "@chakra-ui/react";
|
||||
import { TaskControls, TaskControlsProps } from "./TaskControls";
|
||||
import { TaskControls, TaskControlsProps } from "src/components/Survey/TaskControls";
|
||||
|
||||
interface TaskControlsOverridableProps extends TaskControlsProps {
|
||||
isValid: boolean;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Container } from "./Container";
|
||||
import Image from "next/image";
|
||||
import { Container } from "src/components/Container";
|
||||
|
||||
const Vision = () => {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user