Skip to content

Commit

Permalink
Merge pull request #16 from LiuXianJing/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
LiuXianJing authored Apr 12, 2024
2 parents b36de38 + 98c4fb0 commit ac61d4d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
5 changes: 0 additions & 5 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,10 @@ import VisualLargeScreen from "./views/VisualLargeScreen";
import Other from "./views/Other";
import ChatChat from "./views/ChatChat";
import majesticMusic from './assets/audio/majestic_music.mp3'
import { playMusic } from "./utils";
import './App.less'

function App() {

useEffect(() => {
playMusic()
}, [])

return <>
<BrowserRouter future={{ v7_startTransition: true }}>
<ConfigProvider locale={enUS}>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/api/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import axios, { AxiosRequestConfig } from 'axios';

const instance = axios.create({
baseURL: 'http://127.0.0.1:5000/',
timeout: 1000,
timeout: 2000,
headers: {'X-Custom-Header': 'xxx'}
});

Expand Down
3 changes: 1 addition & 2 deletions frontend/src/views/ChatChat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useEffect, useState } from "react"
import Chat from "../../components/Chat"
import { ChatDataType } from "../../types"
import { getChatMessagesAPI, sendChatMessageAPI, } from "../../api"
import { getUserAvatarUrl, playMusic } from "../../utils"
import { getUserAvatarUrl, } from "../../utils"
import './index.less'

const ChatChat = () => {
Expand All @@ -11,7 +11,6 @@ const ChatChat = () => {

useEffect(() => {
getChatData()
playMusic()
/* let timer = setInterval(() => {
getChatData()
}, 2 * 1000)
Expand Down

0 comments on commit ac61d4d

Please sign in to comment.