refactor: more TS code

This commit is contained in:
Tristan Yang
2022-07-08 19:13:49 +08:00
parent 678b8515ca
commit 9f1b115c73
55 changed files with 421 additions and 338 deletions
+1 -2
View File
@@ -20,7 +20,6 @@ const StyledConfirm = styled.div`
gap: 10px;
width: 250px;
.tip {
/* word-break: break-all; */
color: orange;
font-size: 12px;
line-height: 1.5;
@@ -100,7 +99,7 @@ export default function APIConfig() {
</Tippy>
<div className="tip">
Tip: The security key agreed between the server and the third-party app is used to encrypt
the communication data.{" "}
the communication data.
</div>
</Styled>
);
+2 -3
View File
@@ -4,7 +4,7 @@ import StyledSettingContainer from "../../common/component/StyledSettingContaine
import useNavs from "./navs";
import LogoutConfirmModal from "./LogoutConfirmModal";
let from: string | null = null;
let from: string = "";
export default function Setting() {
const [searchParams] = useSearchParams();
@@ -15,10 +15,9 @@ export default function Setting() {
const [logoutConfirm, setLogoutConfirm] = useState(false);
const navigateTo = useNavigate();
const close = () => {
// dispatch(toggleSetting());
// todo: check usage
navigateTo(from!);
from = null;
from = "";
};
const toggleLogoutConfirm = () => {