added language support
This commit is contained in:
1 parent
03a735b281
commit
8985312dd2
5 files changed
+41
-20
No files matched your search
@@ -16,7 +16,7 @@ export const BottomBar: FC<BottomBarProps> = ({ api }) => {
|
||||
|
||||
return (
|
||||
<div className="bottom-bar center row">
|
||||
<Modal open={isOpen}>
|
||||
<Modal open={isOpen} className="center column">
|
||||
<UserProfileEditor api={api} />
|
||||
<Button onClick={() => setOpen(false)}>{lang.get("CLOSE")}</Button>
|
||||
</Modal>
|
||||
|
||||
@@ -9,14 +9,15 @@ export interface ModalStyleProps {
|
||||
}
|
||||
export interface Props extends ModalStyleProps {
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
}
|
||||
export const Modal: FC<Props> = ({ children, open }) => {
|
||||
export const Modal: FC<Props> = ({ children, open, className }) => {
|
||||
const { isMobile } = useWindowSize();
|
||||
return (
|
||||
<MuiModal open={open}>
|
||||
<div className={["modal--root", isMobile ? "mobile" : ""].join(" ")}>
|
||||
<Card variant="outlined">
|
||||
<CardContent>{children}</CardContent>
|
||||
<CardContent className={className}>{children}</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
</MuiModal>
|
||||
|
||||
@@ -15,7 +15,7 @@ import { ConfirmProvider } from "material-ui-confirm";
|
||||
import { Color } from "@mui/material";
|
||||
import useWindowSize from "utils/useWindowSize";
|
||||
import { ApiService } from "apiService/core";
|
||||
import { useMockApiService } from "apiService";
|
||||
import { ApiStateProvider, useMockApiService } from "apiService";
|
||||
|
||||
export type PageProps = PropsWithChildren<{
|
||||
api: ApiService;
|
||||
@@ -100,7 +100,9 @@ export const Page: FC<PageProps> = (props) => {
|
||||
dense
|
||||
preventDuplicate
|
||||
>
|
||||
<InternalPage {...props} />
|
||||
<ApiStateProvider value={props.api.state}>
|
||||
<InternalPage {...props} />
|
||||
</ApiStateProvider>
|
||||
</SnackbarProvider>
|
||||
</ConfirmProvider>
|
||||
</ThemeProvider>
|
||||
|
||||
Reference in new issue
Block a user