Rename showCustomerEffortScore prop
This commit is contained in:
parent
5494f4970d
commit
23d64d0bc2
|
@ -24,7 +24,7 @@ import HeaderImage from './completed-celebration-header.svg';
|
||||||
type TaskListCompletedHeaderProps = {
|
type TaskListCompletedHeaderProps = {
|
||||||
hideTasks: () => void;
|
hideTasks: () => void;
|
||||||
keepTasks: () => void;
|
keepTasks: () => void;
|
||||||
showCustomerEffortScore: boolean;
|
customerEffortScore: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
const ADMIN_INSTALL_TIMESTAMP_OPTION_NAME =
|
const ADMIN_INSTALL_TIMESTAMP_OPTION_NAME =
|
||||||
|
@ -49,7 +49,7 @@ function getStoreAgeInWeeks( adminInstallTimestamp: number ) {
|
||||||
export const TaskListCompletedHeader: React.FC< TaskListCompletedHeaderProps > = ( {
|
export const TaskListCompletedHeader: React.FC< TaskListCompletedHeaderProps > = ( {
|
||||||
hideTasks,
|
hideTasks,
|
||||||
keepTasks,
|
keepTasks,
|
||||||
showCustomerEffortScore,
|
customerEffortScore,
|
||||||
} ) => {
|
} ) => {
|
||||||
const { updateOptions } = useDispatch( OPTIONS_STORE_NAME );
|
const { updateOptions } = useDispatch( OPTIONS_STORE_NAME );
|
||||||
const [ showCesModal, setShowCesModal ] = useState( false );
|
const [ showCesModal, setShowCesModal ] = useState( false );
|
||||||
|
@ -67,7 +67,7 @@ export const TaskListCompletedHeader: React.FC< TaskListCompletedHeaderProps > =
|
||||||
OPTIONS_STORE_NAME
|
OPTIONS_STORE_NAME
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( showCustomerEffortScore ) {
|
if ( customerEffortScore ) {
|
||||||
const allowTracking = getOption( ALLOW_TRACKING_OPTION_NAME );
|
const allowTracking = getOption( ALLOW_TRACKING_OPTION_NAME );
|
||||||
const adminInstallTimestamp: number =
|
const adminInstallTimestamp: number =
|
||||||
getOption( ADMIN_INSTALL_TIMESTAMP_OPTION_NAME ) || 0;
|
getOption( ADMIN_INSTALL_TIMESTAMP_OPTION_NAME ) || 0;
|
||||||
|
|
|
@ -124,7 +124,7 @@ export const SectionedTaskList: React.FC< TaskListProps > = ( {
|
||||||
<TaskListCompletedHeader
|
<TaskListCompletedHeader
|
||||||
hideTasks={ hideTasks }
|
hideTasks={ hideTasks }
|
||||||
keepTasks={ keepTasks }
|
keepTasks={ keepTasks }
|
||||||
showCustomerEffortScore={ true }
|
customerEffortScore={ true }
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<TaskListCompleted
|
<TaskListCompleted
|
||||||
|
|
|
@ -234,7 +234,7 @@ export const TaskList: React.FC< TaskListProps > = ( {
|
||||||
<TaskListCompletedHeader
|
<TaskListCompletedHeader
|
||||||
hideTasks={ hideTasks }
|
hideTasks={ hideTasks }
|
||||||
keepTasks={ keepTasks }
|
keepTasks={ keepTasks }
|
||||||
showCustomerEffortScore={ true }
|
customerEffortScore={ true }
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<TaskListCompleted
|
<TaskListCompleted
|
||||||
|
|
Loading…
Reference in New Issue