chore: 移除未使用的 BottomNav 组件
This commit is contained in:
1 parent
2d1f754a46
commit
9d9c7e3eec
1 file changed
-26
@@ -1,26 +0,0 @@
|
||||
// Author: fruit.com.cn
|
||||
import { Compass, Home, ListVideo, UserRound } from 'lucide-react';
|
||||
import { NavLink, useLocation } from 'react-router-dom';
|
||||
import { useLocale } from '../../app/providers/AppProviders';
|
||||
|
||||
export function BottomNav() {
|
||||
const { locale } = useLocale();
|
||||
const location = useLocation();
|
||||
const items = [
|
||||
[Home, locale.home, '/'],
|
||||
[Compass, locale.shorts, '/shorts'],
|
||||
[ListVideo, locale.subscriptions, '/subscriptions'],
|
||||
[UserRound, locale.you, '/library'],
|
||||
];
|
||||
const navClass = (to) => (location.pathname === to ? 'active' : '');
|
||||
|
||||
return (
|
||||
<nav className="bottom-nav">
|
||||
{items.map(([Icon, label, to]) => (
|
||||
<NavLink to={to} className={() => navClass(to)} key={to}>
|
||||
<Icon size={24} /><span>{label}</span>
|
||||
</NavLink>
|
||||
))}
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user