perf: delete setup exit animation
This commit is contained in:
parent
f6864e06be
commit
d325be4bec
2 changed files with 2 additions and 14 deletions
|
@ -10,7 +10,6 @@ import Setup from '@/app/content/views/Setup'
|
||||||
import MessageListDomain from '@/domain/MessageList'
|
import MessageListDomain from '@/domain/MessageList'
|
||||||
import { useEffect, useRef } from 'react'
|
import { useEffect, useRef } from 'react'
|
||||||
import { Toaster } from 'sonner'
|
import { Toaster } from 'sonner'
|
||||||
import { AnimatePresence, motion } from 'framer-motion'
|
|
||||||
|
|
||||||
import DanmakuContainer from './components/DanmakuContainer'
|
import DanmakuContainer from './components/DanmakuContainer'
|
||||||
import DanmakuDomain from '@/domain/Danmaku'
|
import DanmakuDomain from '@/domain/Danmaku'
|
||||||
|
@ -69,18 +68,7 @@ export default function App() {
|
||||||
<Header />
|
<Header />
|
||||||
<Main />
|
<Main />
|
||||||
<Footer />
|
<Footer />
|
||||||
<AnimatePresence>
|
{notUserInfo && <Setup></Setup>}
|
||||||
{notUserInfo && (
|
|
||||||
<motion.div
|
|
||||||
className="contents"
|
|
||||||
initial={{ opacity: 1 }}
|
|
||||||
exit={{ opacity: 0 }}
|
|
||||||
transition={{ duration: 0.3 }}
|
|
||||||
>
|
|
||||||
<Setup></Setup>
|
|
||||||
</motion.div>
|
|
||||||
)}
|
|
||||||
</AnimatePresence>
|
|
||||||
<Toaster richColors offset="70px" visibleToasts={1} position="top-center"></Toaster>
|
<Toaster richColors offset="70px" visibleToasts={1} position="top-center"></Toaster>
|
||||||
</AppMain>
|
</AppMain>
|
||||||
<AppButton></AppButton>
|
<AppButton></AppButton>
|
||||||
|
|
|
@ -71,8 +71,8 @@ const Setup: FC = () => {
|
||||||
const [userInfo, setUserInfo] = useState<UserInfo>()
|
const [userInfo, setUserInfo] = useState<UserInfo>()
|
||||||
|
|
||||||
const handleSetup = () => {
|
const handleSetup = () => {
|
||||||
send(userInfoDomain.command.UpdateUserInfoCommand(userInfo!))
|
|
||||||
send(messageListDomain.command.ClearListCommand())
|
send(messageListDomain.command.ClearListCommand())
|
||||||
|
send(userInfoDomain.command.UpdateUserInfoCommand(userInfo!))
|
||||||
}
|
}
|
||||||
|
|
||||||
const refreshUserInfo = async () => {
|
const refreshUserInfo = async () => {
|
||||||
|
|
Loading…
Reference in a new issue