mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-07-17 11:23:49 +08:00
Refactor fetch and post to use axios
Fix set_label id missing in payload use frontend_message_id pre-commit Refactor api fetcher/poster to axios create lint Remove string literal for path Revert oasst_api_client.ts Fix warning httpStatusCode OasstError optional parameter Refactor remove api base url for local api Lint add blank line
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Box, CircularProgress, useColorModeValue } from "@chakra-ui/react";
|
||||
import { MessageTable } from "src/components/Messages/MessageTable";
|
||||
import fetcher from "src/lib/fetcher";
|
||||
import { get } from "src/lib/api";
|
||||
import useSWR from "swr";
|
||||
|
||||
interface UserMessagesCellProps {
|
||||
@@ -16,7 +16,7 @@ interface UserMessagesCellProps {
|
||||
*/
|
||||
const UserMessagesCell = ({ path }: UserMessagesCellProps) => {
|
||||
const url = path || "/api/messages/user";
|
||||
const { data: messages, isLoading } = useSWR(url, fetcher, {
|
||||
const { data: messages, isLoading } = useSWR(url, get, {
|
||||
refreshInterval: 2000,
|
||||
});
|
||||
// TODO(#651): This box coloring and styling is used in multiple places. We
|
||||
|
||||
Reference in New Issue
Block a user