Commit 7a829213 by HoMeTown

feat: history empty status

parent 6116c8f8
import { motion } from 'framer-motion' import { motion } from 'framer-motion'
import { Button } from '@nextui-org/react' import { Button } from '@nextui-org/react'
import { containerVariants, itemVariants } from '../../motionAnimate' import { containerVariants, itemVariants } from '../../motionAnimate'
import EmptyIcon from '@/assets/svg/empty.svg?react'
import { useAppSelector } from '@/store/hook' import { useAppSelector } from '@/store/hook'
export const HistoryBarList: React.FC = () => { export const HistoryBarList: React.FC = () => {
const { conversations } = useAppSelector(state => state.conversation) const { conversations } = useAppSelector(state => state.conversation)
return ( return (
conversations.length !== 0
? (
<motion.ul <motion.ul
variants={containerVariants} variants={containerVariants}
initial="hidden" initial="hidden"
...@@ -43,4 +46,11 @@ export const HistoryBarList: React.FC = () => { ...@@ -43,4 +46,11 @@ export const HistoryBarList: React.FC = () => {
} }
</motion.ul> </motion.ul>
) )
: (
<div className="flex w-full h-full items-center justify-center flex-col">
<EmptyIcon />
<p className="text-[13px] text-[#27353C] mt-[16px]">暂无历史对话</p>
</div>
)
)
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment