diff --git a/package.json b/package.json index 152f3e1e..63da6d6f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iSunFA", - "version": "0.8.2+25", + "version": "0.8.2+26", "private": false, "scripts": { "dev": "next dev", diff --git a/src/components/cta_section/cta_section.tsx b/src/components/cta_section/cta_section.tsx index 0dd76ff7..beba7b17 100644 --- a/src/components/cta_section/cta_section.tsx +++ b/src/components/cta_section/cta_section.tsx @@ -13,7 +13,7 @@ const CTASection = () => { const animeRef1 = useRef(null); const [isAnimeRef1Visible, setIsAnimeRef1Visible] = useState(false); - const { signedIn } = useContext(UserContext); + const { isSignIn } = useContext(UserContext); useEffect(() => { const waitForCTA = setTimeout(() => { @@ -49,7 +49,7 @@ const CTASection = () => { - ); - } -); - -const Loader = React.memo(() => { +const Loader = () => { return (
); -}); +}; const LoginPageBody = ({ invitation, action }: ILoginPageProps) => { const { t } = useTranslation('common'); @@ -83,25 +47,74 @@ const LoginPageBody = ({ invitation, action }: ILoginPageProps) => { return (
+ +
+ + + +
+ {isAuthLoading ? ( ) : ( -
-

- {t('common:LOGIN_PAGE_BODY.LOG_IN')} -

-
+
+
+

iSunFA

+

{t('common:LOGIN_PAGE_BODY.LOG_IN')}

+
+ +
-
- - {/* Info: (20240819-Tzuhan) [Beta] Apple login is not supported in the beta version - */} + +
+ + + {/* // Info: (20241001 - Liz) 登入 Apple 功能待實作 */} +
)}
); + + // return ( + //
+ //
+ // {isAuthLoading ? ( + // + // ) : ( + //
+ //

+ // {t('common:LOGIN_PAGE_BODY.LOG_IN')} + //

+ //
+ // + //
+ //
+ // + // {/* Info: (20240819-Tzuhan) [Beta] Apple login is not supported in the beta version + // */} + //
+ //
+ // )} + //
+ // ); }; export default LoginPageBody; diff --git a/src/components/nav_bar/nav_bar.tsx b/src/components/nav_bar/nav_bar.tsx index 6f9fd3a2..bb375cc9 100644 --- a/src/components/nav_bar/nav_bar.tsx +++ b/src/components/nav_bar/nav_bar.tsx @@ -29,7 +29,7 @@ import { UploadType } from '@/constants/file'; const NavBar = () => { const { t }: { t: TranslateFunction } = useTranslation('common'); - const { signedIn, signOut, username, selectedCompany, userAuth, isAuthLoading, selectCompany } = + const { isSignIn, signOut, username, selectedCompany, userAuth, isAuthLoading, selectCompany } = useUserCtx(); const { profileUploadModalDataHandler, profileUploadModalVisibilityHandler } = useGlobalCtx(); const router = useRouter(); @@ -119,7 +119,7 @@ const NavBar = () => { className="mx-auto flex w-full items-center gap-16px px-24px py-10px text-button-text-secondary disabled:text-button-text-disable" > {/* */} rocket_icon @@ -127,7 +127,7 @@ const NavBar = () => { {/* */} calculator_icon @@ -149,7 +149,7 @@ const NavBar = () => { className="mx-auto flex w-full items-center gap-16px px-24px py-10px text-button-text-secondary disabled:text-button-text-disable" > {/* */} briefcase_icon @@ -157,7 +157,7 @@ const NavBar = () => { {/* */} report_icon @@ -223,7 +223,7 @@ const NavBar = () => { className="mx-auto flex flex-col items-center gap-8px hover:text-button-text-primary-hover disabled:text-button-text-disable" > {/* */} rocket_icon @@ -234,7 +234,7 @@ const NavBar = () => { {/* Info: (20240416 - Julian) Account button */}
- {signedIn ? username ?? DEFAULT_DISPLAYED_USER_NAME : ''} + {isSignIn ? (username ?? DEFAULT_DISPLAYED_USER_NAME) : ''}
{/* Info: (20240809 - Shirley) edit name button */}