update
This commit is contained in:
@@ -9,7 +9,12 @@ enum Status {
|
||||
receive,
|
||||
}
|
||||
|
||||
export function HomeButton() {
|
||||
interface Props {
|
||||
isSignIn: boolean;
|
||||
onNotSignIn: () => void;
|
||||
}
|
||||
|
||||
export function HomeButton(props: Props) {
|
||||
let [status, setStatus] = useState(Status.normal);
|
||||
let [boxStyle, setBoxStyle] = useState([style.box]);
|
||||
let [isReceive, setIsReceive] = useState(false);
|
||||
@@ -54,7 +59,11 @@ export function HomeButton() {
|
||||
onMouseEnter={onReceive}
|
||||
onMouseLeave={onNormal}
|
||||
onClick={() => {
|
||||
setIsReceive(true);
|
||||
if (props.isSignIn) {
|
||||
setIsReceive(true);
|
||||
} else {
|
||||
props.onNotSignIn();
|
||||
}
|
||||
}}
|
||||
>
|
||||
接收文件
|
||||
|
||||
Reference in New Issue
Block a user