provide language
parent
c967a494d8
commit
c47271ac04
74
src/App.js
74
src/App.js
|
@ -60,14 +60,9 @@ export function Loading() {
|
|||
}
|
||||
|
||||
export default function App() {
|
||||
/*const [notificationApi, notificationContextHolder] =
|
||||
notification.useNotification();
|
||||
*/
|
||||
const { _, i18n } = useTranslation();
|
||||
|
||||
const { userSession, setUserSession } = UseUserSession();
|
||||
//const [isWebSocketReady, setIsWebSocketReady] = useState(false);
|
||||
|
||||
const [appUserData, setAppUserData] = useState(null);
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -135,72 +130,3 @@ export default function App() {
|
|||
</Layout>
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
<WebSocketProvider
|
||||
userSession={userSession}
|
||||
setUserSession={setUserSession}
|
||||
isWebSocketReady={isWebSocketReady}
|
||||
setIsWebSocketReady={setIsWebSocketReady}
|
||||
notificationApi={notificationApi}
|
||||
>
|
||||
<ReconnectingView isWebSocketReady={isWebSocketReady} />
|
||||
|
||||
<DashboardLayout
|
||||
userSession={userSession}
|
||||
setUserSession={setUserSession}
|
||||
/>
|
||||
</WebSocketProvider>
|
||||
*/
|
||||
|
||||
/*
|
||||
const ReconnectingView = ({ isWebSocketReady }) => {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
position: "fixed",
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
||||
display: isWebSocketReady ? "none" : "block",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
zIndex: 9999,
|
||||
}}
|
||||
>
|
||||
<svg id="loading-reconnecting" className="loading" viewBox="0 0 1350 600">
|
||||
<text x="50%" y="50%" fill="transparent" textAnchor="middle">
|
||||
C O M P A N Y
|
||||
</text>
|
||||
</svg>
|
||||
<div
|
||||
style={{
|
||||
height: "100vh",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<span
|
||||
style={{
|
||||
marginTop: 80,
|
||||
fontWeight: "bold",
|
||||
fontSize: 24,
|
||||
letterSpacing: 2,
|
||||
}}
|
||||
>
|
||||
Connecting...
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}; */
|
||||
|
||||
// TODO: Undo this
|
||||
/*
|
||||
<text x="50%" y="50%" fill="transparent" textAnchor="middle">
|
||||
J A N N E X
|
||||
</text>
|
||||
*/
|
||||
|
|
|
@ -16,7 +16,7 @@ import { useTranslation } from "react-i18next";
|
|||
import MyAppLogo from "../../Components/MyAppLogo";
|
||||
|
||||
export default function Login() {
|
||||
const { t } = useTranslation();
|
||||
const { t, i18n } = useTranslation();
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const [notificationApi, notificationContextHolder] =
|
||||
|
@ -62,6 +62,7 @@ export default function Login() {
|
|||
|
||||
if (selectedMethod === "2") {
|
||||
body.username = values.username;
|
||||
body.language = i18n.language;
|
||||
}
|
||||
|
||||
myFetch({
|
||||
|
|
|
@ -201,7 +201,7 @@ function ModalAddEditEmployee({
|
|||
setModalOptions,
|
||||
fetchEmployees,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const { t, i18n } = useTranslation();
|
||||
const [notificationApi, notificationContextHolder] =
|
||||
notification.useNotification();
|
||||
const { storeId } = useParams();
|
||||
|
@ -283,6 +283,7 @@ function ModalAddEditEmployee({
|
|||
username: values.username,
|
||||
accountName: values.accountName,
|
||||
password: EncodeStringToBase64(values.password),
|
||||
language: i18n.language,
|
||||
};
|
||||
|
||||
if (
|
||||
|
|
Loading…
Reference in New Issue