Rename const to taskInfo

This commit is contained in:
rjmacarthy
2023-01-27 10:16:25 +00:00
parent 24f4c08796
commit e6009933db
+3 -3
View File
@@ -16,7 +16,7 @@ export const TaskPage = ({ type }: TaskPageProps) => {
const { t } = useTranslation(["tasks", "common"]);
const apiHook = apiHooksByType[type];
const { tasks, isLoading, reset, trigger, error } = apiHook(type);
const taskType = TaskInfos.find((taskType) => taskType.type === type);
const taskInfo = TaskInfos.find((taskType) => taskType.type === type);
if (isLoading) {
return <LoadingScreen text={t("common:loading")} />;
@@ -31,8 +31,8 @@ export const TaskPage = ({ type }: TaskPageProps) => {
return (
<>
<Head>
<title>{t(getTypeSafei18nKey(`${taskType.id}.label`))}</title>
<meta name="description" content={t(getTypeSafei18nKey(`${taskType.id}.desc`))} />
<title>{t(getTypeSafei18nKey(`${taskInfo.id}.label`))}</title>
<meta name="description" content={t(getTypeSafei18nKey(`${taskInfo.id}.desc`))} />
</Head>
<Task key={task.task.id} frontendId={task.id} task={task.task} trigger={trigger} mutate={reset} />
</>