Skip to content

Commit

Permalink
make tooltip text constant into its own variable
Browse files Browse the repository at this point in the history
  • Loading branch information
chiaberry committed Oct 16, 2024
1 parent d244067 commit a60747a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions moped-editor/src/constants/projects.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const substantialCompletionDateTooltipText =
"The earliest confirmed start date of a project phase that has a simple phase name of Complete (Complete or Post-construction)";
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Box, Typography, Tooltip } from "@mui/material";
import makeStyles from "@mui/styles/makeStyles";
import { formatDateType } from "src/utils/dateAndTime";
import { substantialCompletionDateTooltipText } from "src/constants/projects";

const useStyles = makeStyles((theme) => ({
fieldLabel: {
Expand All @@ -16,9 +17,6 @@ const useStyles = makeStyles((theme) => ({
},
}));

const completionDateTooltipText =
"The earliest confirmed start date of a project phase that has a simple phase name of Complete (Complete or Post-construction)";

const ProjectSubstantialCompletionDate = ({ completionDate }) => {
const classes = useStyles();
return (
Expand All @@ -31,7 +29,10 @@ const ProjectSubstantialCompletionDate = ({ completionDate }) => {
justifyContent="flex-start"
className={classes.fieldBox}
>
<Tooltip placement="bottom-start" title={completionDateTooltipText}>
<Tooltip
placement="bottom-start"
title={substantialCompletionDateTooltipText}
>
<Typography className={classes.fieldLabelText} component="span">
{
// If there is no input, render a "-"
Expand Down

0 comments on commit a60747a

Please sign in to comment.