1. footer 社交账号修改
2. Nav 路径匹配
feature/artists
mackt 7 months ago
parent fbc3a87530
commit a2959b03a4

@ -8,7 +8,7 @@ import MiniFooter from './MiniFooter';
export default function Footer() { export default function Footer() {
const pathName = usePathname(); const pathName = usePathname();
const showFullFooter = pathName === '/' || /^\/vol\//.test(pathName); // 展示大 footer const showFullFooter = pathName === '/' || /^\/vol\//.test(pathName) || /^\/music\//.test(pathName); // 展示大 footer
const showNoFooter = /^\/my\//.test(pathName); // 不展示 footer const showNoFooter = /^\/my\//.test(pathName); // 不展示 footer
return ( return (

@ -19,11 +19,11 @@ export const agreementList = [
export const platformList = [ export const platformList = [
{ {
name: '雀乐音乐人', name: '音乐人入驻',
url: '#', url: '#',
}, },
{ {
name: '乐商城', name: '乐商城',
url: '#', url: '#',
}, },
]; ];
@ -56,11 +56,11 @@ export const socialList: IFooterLink[][] = [
// name: '雀乐微信群', // name: '雀乐微信群',
// url: '#', // url: '#',
// }, // },
{ // {
name: '关于雀乐', // name: '关于雀乐',
url: '/about', // url: '/about',
target: '_self', // target: '_self',
}, // },
{ {
name: '抖音', name: '抖音',
url: 'https://www.douyin.com/user/MS4wLjABAAAAc7W6Pt4PbkLp7IdWD6IHUshkBjGwerHZSHn-U5p6JT8', url: 'https://www.douyin.com/user/MS4wLjABAAAAc7W6Pt4PbkLp7IdWD6IHUshkBjGwerHZSHn-U5p6JT8',

@ -24,7 +24,7 @@ export default function Nav({ type = 'server' }: { type?: NextComponentType }) {
const pathMatch = (path: string) => { const pathMatch = (path: string) => {
if (path === '/') { if (path === '/') {
return pathName === path || /^\/vol\//.test(pathName) || /^\/music\//.test(pathName); return pathName === '/' || /^\/vol\//.test(pathName) || /^\/music\//.test(pathName);
} }
return pathName === path; return pathName === path;
}; };

Loading…
Cancel
Save