fixes
- change refresh icon & apply refreshing logic - apply validation in action btn in menu - preserve on customer info state upon refresh
This commit is contained in:
@@ -3,16 +3,25 @@
|
||||
flex-direction: row;
|
||||
justify-content: end;
|
||||
padding: 0 16px;
|
||||
gap: 10px;
|
||||
gap: 8px;
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
z-index: 1000;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
:global(.ant-app-rtl) .languageSwitch {
|
||||
left: 0;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
:global(.ant-app-ltr) .languageSwitch {
|
||||
right: 0;
|
||||
.refreshIcon {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
:global(.ant-app-rtl) .refreshIcon {
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import { useDispatch } from "react-redux";
|
||||
import { useAppSelector } from "redux/hooks";
|
||||
import ProText from "../ProText";
|
||||
import styles from "./LanguageSwitch.module.css";
|
||||
import RefershIcon from "components/Icons/RefershIcon";
|
||||
|
||||
export function LanguageSwitch() {
|
||||
const dispatch = useDispatch();
|
||||
@@ -23,11 +24,15 @@ export function LanguageSwitch() {
|
||||
});
|
||||
};
|
||||
|
||||
const refreshPage = () => {
|
||||
window.location.reload();
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={styles.languageSwitch}>
|
||||
<GlobalOutlined
|
||||
style={{
|
||||
color: themeName === "dark" ? "#fff" : "#434E5C",
|
||||
color: themeName === "dark" ? "#fff" : "#333333",
|
||||
fontSize: 15,
|
||||
marginRight: 3,
|
||||
cursor: isPending ? "wait" : "pointer",
|
||||
@@ -37,23 +42,19 @@ export function LanguageSwitch() {
|
||||
/>
|
||||
<ProText
|
||||
style={{
|
||||
color: themeName === "dark" ? "#fff" : "#434E5C",
|
||||
color: themeName === "dark" ? "#fff" : "#333333",
|
||||
fontSize: 14,
|
||||
marginRight: 3,
|
||||
opacity: isPending ? 0.7 : 1,
|
||||
[isRTL ? "marginLeft" : "marginRight"]: 3,
|
||||
}}
|
||||
onClick={changeLanguage}
|
||||
>
|
||||
{isPending ? "..." : isRTL ? "English" : "Arabic"}
|
||||
</ProText>
|
||||
<ShakeOutlined
|
||||
style={{
|
||||
color: themeName === "dark" ? "#fff" : "#434E5C",
|
||||
fontSize: 15,
|
||||
marginRight: 3,
|
||||
[isRTL ? "marginLeft" : "marginRight"]: 3,
|
||||
}}
|
||||
/>
|
||||
<div onClick={refreshPage}>
|
||||
<RefershIcon dimension={18} className={styles.refreshIcon} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user