Added tech routing paths and basic structure of landing page + sign in + reducers BOD-95
This commit is contained in:
29
client/src/components/tech-header/tech-header.component.jsx
Normal file
29
client/src/components/tech-header/tech-header.component.jsx
Normal file
@@ -0,0 +1,29 @@
|
||||
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;
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
technician: selectTechnician,
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
//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.name })
|
||||
: t("tech.labels.notloggedin")}
|
||||
</Typography.Title>
|
||||
</Header>
|
||||
);
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(TechHeader);
|
||||
Reference in New Issue
Block a user