refactor: Remove unnecessary line and improve login handling in UserAuth component
refactor: Add clearComparisonProduct call in KeyPressListener for better state management
This commit is contained in:
parent
c8fe8f05fb
commit
922dfb3543
|
@ -38,7 +38,6 @@ const UserAuth: React.FC = () => {
|
|||
const handleLogin = async (e: FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
const organization = email.split("@")[1].split(".")[0];
|
||||
|
||||
try {
|
||||
const res = await signInApi(email, password, organization, fingerprint);
|
||||
if (res.message.message === "login successfull") {
|
||||
|
|
|
@ -20,8 +20,10 @@ import useCameraModeStore, {
|
|||
import { detectModifierKeys } from "./detectModifierKeys";
|
||||
import { useSelectedZoneStore } from "../../store/visualization/useZoneStore";
|
||||
import { useLogger } from "../../components/ui/log/LoggerContext";
|
||||
import { useComparisonProduct } from "../../store/simulation/useSimulationStore";
|
||||
|
||||
const KeyPressListener: React.FC = () => {
|
||||
const { clearComparisonProduct } = useComparisonProduct();
|
||||
const { activeModule, setActiveModule } = useModuleStore();
|
||||
const { setActiveSubTool } = useActiveSubTool();
|
||||
const { toggleUILeft, toggleUIRight, setToggleUI } = useToggleStore();
|
||||
|
@ -170,6 +172,7 @@ const KeyPressListener: React.FC = () => {
|
|||
clearSelectedZone();
|
||||
setShowShortcuts(false);
|
||||
setIsVersionSaved(false);
|
||||
clearComparisonProduct();
|
||||
setIsLogListVisible(false);
|
||||
setIsRenameMode(false);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue