소스 검색

fix: 返回主页按钮优化

ansoni 1 개월 전
부모
커밋
b382108e59
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 0
      src/app/[locale]/(TabBar)/[[...share]]/@swiperWidget/page.tsx
  2. 1 2
      src/components/HeaderBack/index.tsx

+ 1 - 0
src/app/[locale]/(TabBar)/[[...share]]/@swiperWidget/page.tsx

@@ -17,6 +17,7 @@ const getBanners = React.cache(async () => {
 });
 const Page = async () => {
     const banners = await getBanners();
+    console.log(`🚀🚀🚀🚀🚀-> in page.tsx on 20`, banners);
 
     if (!banners.length) return null;
 

+ 1 - 2
src/components/HeaderBack/index.tsx

@@ -7,7 +7,6 @@ import { FC, PropsWithChildren, ReactNode, useEffect, useState } from "react";
 import styles from "./style.module.scss";
 
 // import { getToken } from "@/utils/Cookies";
-import clearCache from "./actions";
 
 /**
  * @description 自定义头部返回组件
@@ -66,7 +65,7 @@ const HeaderBack: FC<PropsWithChildren<HeaderBackProps>> = ({
     const router = useRouter();
     const goPage = async (path = "") => {
         if (path) {
-            await clearCache();
+            // await clearCache();
             router.replace("/");
             return;
         }