Commit 787421db by HoMeTown

fix: 修复joyride打包后不显示的问题

parent ca14fee6
......@@ -7,7 +7,6 @@ import { AppRoutes } from './routes/AppRoutes'
import { AuthProvider } from './auth/AuthContext'
import ToastWrapper from './components/ToastWrapper/ToastWrapper'
import { store } from './store'
import JoyrideStep from './components/JoyrideStep'
const App: React.FC = () => {
return (
......@@ -16,7 +15,6 @@ const App: React.FC = () => {
<AuthProvider>
<Router basename="/sdream-ai">
<MainLayout>
<JoyrideStep />
<AppRoutes />
</MainLayout>
</Router>
......
......@@ -7,7 +7,7 @@ export default function JoyrideStep() {
const [run] = useState(isMobile() && !joyrideLocal)
const steps = [
{
target: '.layoutNavBarAgent',
target: '.layoutNavBarJoyride',
content: '点击logo 解锁更多功能 🎉',
},
]
......
......@@ -13,6 +13,7 @@ import { NAV_BAR_ITEMS } from '@/config/nav'
import { useAppDispatch, useAppSelector } from '@/store/hook'
import Logo from '@/assets/svg/logo.svg?react'
import { isMobile } from '@/utils'
import JoyrideStep from '@/components/JoyrideStep'
interface NavbarProps {
isHistoryVisible: boolean
......@@ -85,9 +86,10 @@ const NavbarBase: React.FC<NavbarProps & WithAuthProps> = ({ isHistoryVisible, c
}, navRef)
return (
<>
<motion.nav ref={navRef} className="h-full flex-shrink-0 flex flex-col items-center justify-center">
{/* hidden */}
<motion.div className={`${styles.layoutNavBarAgent} rounded-full ${isH5NavVisible ? 'h-[55px] bg-white/40' : 'h-[380px]'} w-[54px] overflow-hidden py-[8px] sm:w-[64px] sm:bg-white gap-[24px] sm:h-auto sm:rounded-3xl sm:flex sm:py-[24px] sm:px-[8px]`}>
<motion.div className={`layoutNavBarJoyride ${styles.layoutNavBarAgent} rounded-full ${isH5NavVisible ? 'h-[55px] bg-white/40' : 'h-[380px]'} w-[54px] overflow-hidden py-[8px] sm:w-[64px] sm:bg-white gap-[24px] sm:h-auto sm:rounded-3xl sm:flex sm:py-[24px] sm:px-[8px]`}>
<NavBarItem isHistoryVisible={isHistoryVisible} onClick={handleClick} icon={Logo} label="" key="logo" type={isMobile() ? 'logo3' : 'logo'} />
{NAV_BAR_ITEMS.map((item) => {
......@@ -98,6 +100,9 @@ const NavbarBase: React.FC<NavbarProps & WithAuthProps> = ({ isHistoryVisible, c
<User onLogout={handleLogout} />
</motion.div>
</motion.nav>
<JoyrideStep />
</>
)
}
......
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