refactor(ui): extract auth and avatar components
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
* 认证面板:顶层 switch(Facebook / Email)+ 悬浮返回按钮
|
||||
*/
|
||||
import { useRouter } from "next/navigation";
|
||||
import { ChevronLeft } from "lucide-react";
|
||||
|
||||
import { useAuthDispatch, useAuthState } from "@/stores/auth/auth-context";
|
||||
|
||||
import { AuthBackButton } from "./auth-back-button";
|
||||
import { AuthEmailPanel } from "./auth-email-panel";
|
||||
import { AuthFacebookPanel } from "./auth-facebook-panel";
|
||||
import styles from "./auth-panel.module.css";
|
||||
@@ -29,14 +29,7 @@ export function AuthPanel() {
|
||||
|
||||
return (
|
||||
<div className={styles.panelShell}>
|
||||
<button
|
||||
type="button"
|
||||
className={styles.backButton}
|
||||
onClick={handleBack}
|
||||
aria-label="Back"
|
||||
>
|
||||
<ChevronLeft size={20} strokeWidth={2.5} aria-hidden="true" />
|
||||
</button>
|
||||
<AuthBackButton onClick={handleBack} />
|
||||
|
||||
{state.authPanelMode === "facebook" ? (
|
||||
<AuthFacebookPanel />
|
||||
|
||||
Reference in New Issue
Block a user