Reformat all project files to use the prettier config file.

This commit is contained in:
Patrick Fic
2024-03-27 15:35:07 -07:00
parent b161530381
commit e1df64d592
873 changed files with 111387 additions and 125473 deletions

View File

@@ -1,16 +1,16 @@
import { AlertOutlined } from '@ant-design/icons';
import { Alert, Button, Col, Row, Space } from 'antd';
import i18n from 'i18next';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { selectUpdateAvailable } from '../../redux/application/application.selectors';
import { useRegisterSW } from 'virtual:pwa-register/react';
import InstanceRenderManager from '../../utils/instanceRenderMgr';
import { AlertOutlined } from "@ant-design/icons";
import { Alert, Button, Col, Row, Space } from "antd";
import i18n from "i18next";
import React from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectUpdateAvailable } from "../../redux/application/application.selectors";
import { useRegisterSW } from "virtual:pwa-register/react";
import InstanceRenderManager from "../../utils/instanceRenderMgr";
const mapStateToProps = createStructuredSelector({
updateAvailable: selectUpdateAvailable,
updateAvailable: selectUpdateAvailable
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
@@ -22,60 +22,59 @@ export function UpdateAlert({ updateAvailable }) {
const {
offlineReady: [
offlineReady, //setOfflineReady
offlineReady //setOfflineReady
],
needRefresh: [
needRefresh, //setNeedRefresh
needRefresh //setNeedRefresh
],
updateServiceWorker,
updateServiceWorker
} = useRegisterSW({
onRegistered(r) {
// eslint-disable-next-line prefer-template
console.log('SW Registered: ' + r);
console.log("SW Registered: " + r);
r &&
setInterval(() => {
r.update();
}, intervalMS);
},
onRegisterError(error) {
console.log('SW registration error', error);
},
console.log("SW registration error", error);
}
});
if (import.meta.env.DEV)
console.log(`SW Status => Refresh? ${needRefresh} - offlineReady? ${offlineReady}`);
if (import.meta.env.DEV) console.log(`SW Status => Refresh? ${needRefresh} - offlineReady? ${offlineReady}`);
if (!needRefresh) return null;
return (
<Alert
message={t('general.messages.newversiontitle', {
message={t("general.messages.newversiontitle", {
app: InstanceRenderManager({
imex: '$t(titles.imexonline)',
rome: '$t(titles.romeonline)',
promanager: '$t(titles.promanager)',
}),
imex: "$t(titles.imexonline)",
rome: "$t(titles.romeonline)",
promanager: "$t(titles.promanager)"
})
})}
showIcon
icon={<AlertOutlined />}
description={
<Row gutter={[16, 16]}>
<Col sm={24} md={16} lg={18}>
{t('general.messages.newversionmessage', {
{t("general.messages.newversionmessage", {
app: InstanceRenderManager({
imex: '$t(titles.imexonline)',
rome: '$t(titles.romeonline)',
promanager: '$t(titles.promanager)',
}),
imex: "$t(titles.imexonline)",
rome: "$t(titles.romeonline)",
promanager: "$t(titles.promanager)"
})
})}
</Col>
<Col sm={24} md={8} lg={6}>
<Space wrap>
<Button
onClick={async () => {
window.open('https://imex-online.noticeable.news/', '_blank');
window.open("https://imex-online.noticeable.news/", "_blank");
}}
>
{i18n.t('general.actions.viewreleasenotes')}
{i18n.t("general.actions.viewreleasenotes")}
</Button>
<Button
type="primary"
@@ -83,7 +82,7 @@ export function UpdateAlert({ updateAvailable }) {
updateServiceWorker(true);
}}
>
{i18n.t('general.actions.refresh')}
{i18n.t("general.actions.refresh")}
</Button>
</Space>
</Col>