Files
bodyshop/client/src/components/tech-header/tech-header.component.jsx
Allan Carr 90edf94fee IO-3262 Tech Console Job Clock Out
Signed-off-by: Allan Carr <allan@imexsystems.ca>
2025-12-01 12:50:11 -08:00

32 lines
1008 B
JavaScript

import { Layout, Typography } from "antd";
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
});
const mapDispatchToProps = () => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
});
export function TechHeader({ technician }) {
const { t } = useTranslation();
return (
<Header style={{ textAlign: "center", height: "auto", overflow: "visible" }}>
<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);