- the great reformat

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-02-06 18:20:58 -05:00
parent 30c530bcc4
commit e83badb454
912 changed files with 108516 additions and 107493 deletions

View File

@@ -1,31 +1,32 @@
import { Layout, Typography } from "antd";
import {Layout, Typography} from "antd";
import React from "react";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectTechnician } from "../../redux/tech/tech.selectors";
import { useTranslation } from "react-i18next";
const { Header } = Layout;
import {connect} from "react-redux";
import {createStructuredSelector} from "reselect";
import {selectTechnician} from "../../redux/tech/tech.selectors";
import {useTranslation} from "react-i18next";
const {Header} = Layout;
const mapStateToProps = createStructuredSelector({
technician: selectTechnician,
technician: selectTechnician,
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
//setUserLanguage: language => dispatch(setUserLanguage(language))
});
export function TechHeader({ technician }) {
const { t } = useTranslation();
return (
<Header style={{ textAlign: "center" }}>
<Typography.Title style={{ color: "#fff" }}>
{!!technician
? t("tech.labels.loggedin", {
name: `${technician.first_name} ${technician.last_name}`,
})
: t("tech.labels.notloggedin")}
</Typography.Title>
</Header>
);
export function TechHeader({technician}) {
const {t} = useTranslation();
return (
<Header style={{textAlign: "center"}}>
<Typography.Title style={{color: "#fff"}}>
{!!technician
? t("tech.labels.loggedin", {
name: `${technician.first_name} ${technician.last_name}`,
})
: t("tech.labels.notloggedin")}
</Typography.Title>
</Header>
);
}
export default connect(mapStateToProps, mapDispatchToProps)(TechHeader);