+
diff --git a/src/app/pages/subjects/new/subjects.tsx b/src/app/pages/subjects/new/subjects.tsx
index 6a9d0a913..23bd054fe 100644
--- a/src/app/pages/subjects/new/subjects.tsx
+++ b/src/app/pages/subjects/new/subjects.tsx
@@ -11,7 +11,7 @@ import './subjects.scss';
const importLanguageSelector = () => import('./language-selector-section.js');
const importSubjectsListing = () => import('./import-subjects-listing.js');
-const importTutorAd = () => import('./tutor-ad.js');
+const importTutorAd = () => import('./import-tutor-ad.js');
const importInfoBoxes = () => import('./import-info-boxes.js');
const importPhilanthropicSupport = () => import('./philanthropic-support.js');
diff --git a/src/app/pages/subjects/new/tutor-ad.js b/src/app/pages/subjects/new/tutor-ad.tsx
similarity index 51%
rename from src/app/pages/subjects/new/tutor-ad.js
rename to src/app/pages/subjects/new/tutor-ad.tsx
index a2f8f71c7..b3b07cab9 100644
--- a/src/app/pages/subjects/new/tutor-ad.js
+++ b/src/app/pages/subjects/new/tutor-ad.tsx
@@ -1,10 +1,24 @@
import React from 'react';
-import useSubjectsContext from './context';
+import useSubjectsContext, {ImageData} from './context';
import RawHTML from '~/components/jsx-helpers/raw-html';
import useOptimizedImage from '~/helpers/use-optimized-image';
import './tutor-ad.scss';
-export function TutorAdThatTakesData({heading, image, html, ctaLink, ctaText}) {
+export type TutorValue = {
+ heading: string;
+ image: ImageData;
+ adHtml: string;
+ linkHref: string;
+ linkText: string;
+};
+
+export function TutorAdThatTakesData({
+ heading,
+ image,
+ adHtml,
+ linkHref,
+ linkText
+}: TutorValue) {
const optimizedImage = useOptimizedImage(image?.file, 400);
return (
@@ -12,8 +26,10 @@ export function TutorAdThatTakesData({heading, image, html, ctaLink, ctaText}) {
);
@@ -21,9 +37,11 @@ export function TutorAdThatTakesData({heading, image, html, ctaLink, ctaText}) {
export default function TutorAd() {
const {tutorAd} = useSubjectsContext();
- const {image, heading, adHtml: html, linkHref: ctaLink, linkText: ctaText} = tutorAd[0].value;
+ const {image, heading, adHtml, linkHref, linkText} = tutorAd[0].value;
return (
-
+
);
}