diff --git a/apps/site/assets/ts/projects/components/__projects.d.ts b/apps/site/assets/ts/__cms.d.ts similarity index 89% rename from apps/site/assets/ts/projects/components/__projects.d.ts rename to apps/site/assets/ts/__cms.d.ts index 2e19fc26d1..71861bac5d 100644 --- a/apps/site/assets/ts/projects/components/__projects.d.ts +++ b/apps/site/assets/ts/__cms.d.ts @@ -1,4 +1,4 @@ -export interface SimpleProject { +export interface Teaser { date: string; id: number; image: Image | null; diff --git a/apps/site/assets/ts/projects/__tests__/BannerTest.tsx b/apps/site/assets/ts/projects/__tests__/BannerTest.tsx index 1074bd6139..ba180f2ebc 100644 --- a/apps/site/assets/ts/projects/__tests__/BannerTest.tsx +++ b/apps/site/assets/ts/projects/__tests__/BannerTest.tsx @@ -2,10 +2,10 @@ import React from "react"; import renderer from "react-test-renderer"; import { mount } from "enzyme"; import { createReactRoot } from "../../app/helpers/testUtils"; -import { SimpleProject } from "../components/__projects"; +import { Teaser as Project } from "../../__cms"; import Banner, { cmsRouteToClass } from "../components/Banner"; -const bannerTeaser: SimpleProject = { +const bannerTeaser: Project = { title: "Better Bus Project", text: "Too many of our bus routes still fail to live up to our own standards. Through the Better Bus Project, we are changing that.", diff --git a/apps/site/assets/ts/projects/__tests__/MoreProjectsTableTest.tsx b/apps/site/assets/ts/projects/__tests__/MoreProjectsTableTest.tsx index 2f8e221f48..5f531a38d7 100644 --- a/apps/site/assets/ts/projects/__tests__/MoreProjectsTableTest.tsx +++ b/apps/site/assets/ts/projects/__tests__/MoreProjectsTableTest.tsx @@ -2,7 +2,7 @@ import React from "react"; import renderer from "react-test-renderer"; import { mount } from "enzyme"; import { createReactRoot } from "../../app/helpers/testUtils"; -import { SimpleProject as Project } from "../components/__projects"; +import { Teaser as Project } from "../../__cms"; import MoreProjectsTable, { tableHeaderText } from "../components/MoreProjectsTable"; diff --git a/apps/site/assets/ts/projects/__tests__/ProjectUpdateListTest.tsx b/apps/site/assets/ts/projects/__tests__/ProjectUpdateListTest.tsx index 79f323409e..0129196a31 100644 --- a/apps/site/assets/ts/projects/__tests__/ProjectUpdateListTest.tsx +++ b/apps/site/assets/ts/projects/__tests__/ProjectUpdateListTest.tsx @@ -1,6 +1,6 @@ import React from "react"; import renderer from "react-test-renderer"; -import { SimpleProject as Project } from "../components/__projects"; +import { Teaser as Project } from "../../__cms"; import { createReactRoot } from "../../app/helpers/testUtils"; import ProjectUpdateList from "../components/ProjectUpdateList"; diff --git a/apps/site/assets/ts/projects/__tests__/ProjectsPageTest.tsx b/apps/site/assets/ts/projects/__tests__/ProjectsPageTest.tsx index 5bc77044be..745100c032 100644 --- a/apps/site/assets/ts/projects/__tests__/ProjectsPageTest.tsx +++ b/apps/site/assets/ts/projects/__tests__/ProjectsPageTest.tsx @@ -1,7 +1,7 @@ import React from "react"; import renderer from "react-test-renderer"; import { createReactRoot } from "../../app/helpers/testUtils"; -import { SimpleProject as Project } from "../components/__projects"; +import { Teaser as Project } from "../../__cms"; import ProjectsPage, { fetchMoreProjects, updateSelectedMode diff --git a/apps/site/assets/ts/projects/__tests__/SubwayFilterTest.tsx b/apps/site/assets/ts/projects/__tests__/SubwayFilterTest.tsx index d36513182f..e414c28718 100644 --- a/apps/site/assets/ts/projects/__tests__/SubwayFilterTest.tsx +++ b/apps/site/assets/ts/projects/__tests__/SubwayFilterTest.tsx @@ -1,7 +1,6 @@ import React from "react"; import renderer from "react-test-renderer"; import { createReactRoot } from "../../app/helpers/testUtils"; -import { SimpleProject as Project } from "../components/__projects"; import SubwayFilter from "../components/SubwayFilter"; import { diff --git a/apps/site/assets/ts/projects/components/Banner.tsx b/apps/site/assets/ts/projects/components/Banner.tsx index c2560bf6bc..80d5ac78c6 100644 --- a/apps/site/assets/ts/projects/components/Banner.tsx +++ b/apps/site/assets/ts/projects/components/Banner.tsx @@ -1,5 +1,5 @@ import React, { ReactElement } from "react"; -import { SimpleProject as Project, Route } from "./__projects"; +import { Teaser as Project, Route } from "../../__cms"; import { formattedDate } from "../../helpers/date"; import { routeToCSSClass } from "../../helpers/css"; diff --git a/apps/site/assets/ts/projects/components/FeaturedProject.tsx b/apps/site/assets/ts/projects/components/FeaturedProject.tsx index 68a9deb9c2..12aaad6e96 100644 --- a/apps/site/assets/ts/projects/components/FeaturedProject.tsx +++ b/apps/site/assets/ts/projects/components/FeaturedProject.tsx @@ -1,6 +1,6 @@ import React, { ReactElement } from "react"; import RoutePillList from "./RoutePillList"; -import { SimpleProject as Project } from "./__projects"; +import { Teaser as Project } from "../../__cms"; import { formattedDate } from "../../helpers/date"; interface Props { diff --git a/apps/site/assets/ts/projects/components/FeaturedProjectsList.tsx b/apps/site/assets/ts/projects/components/FeaturedProjectsList.tsx index 9845c0d47c..af3c7e615f 100644 --- a/apps/site/assets/ts/projects/components/FeaturedProjectsList.tsx +++ b/apps/site/assets/ts/projects/components/FeaturedProjectsList.tsx @@ -1,5 +1,5 @@ import React, { ReactElement } from "react"; -import { SimpleProject as Project } from "./__projects"; +import { Teaser as Project } from "../../__cms"; import FeaturedProjectsRow from "./FeaturedProjectsRow"; interface Props { diff --git a/apps/site/assets/ts/projects/components/FeaturedProjectsRow.tsx b/apps/site/assets/ts/projects/components/FeaturedProjectsRow.tsx index 020f5b8f57..3aba0c68d0 100644 --- a/apps/site/assets/ts/projects/components/FeaturedProjectsRow.tsx +++ b/apps/site/assets/ts/projects/components/FeaturedProjectsRow.tsx @@ -1,5 +1,5 @@ import React, { ReactElement } from "react"; -import { SimpleProject as Project } from "./__projects"; +import { Teaser as Project } from "../../__cms"; import FeaturedProject from "./FeaturedProject"; interface Props { diff --git a/apps/site/assets/ts/projects/components/MoreProjectsRow.tsx b/apps/site/assets/ts/projects/components/MoreProjectsRow.tsx index 0461d703e2..430ef2e6f4 100644 --- a/apps/site/assets/ts/projects/components/MoreProjectsRow.tsx +++ b/apps/site/assets/ts/projects/components/MoreProjectsRow.tsx @@ -1,7 +1,7 @@ import React, { ReactElement } from "react"; import { isSilverLine } from "../../helpers/silver-line"; import formattedDate from "../../helpers/date"; -import { SimpleProject as Project, Route } from "./__projects"; +import { Teaser as Project, Route } from "../../__cms"; import RouteIcon from "./RouteIcon"; interface Props extends Project { diff --git a/apps/site/assets/ts/projects/components/ProjectUpdateList.tsx b/apps/site/assets/ts/projects/components/ProjectUpdateList.tsx index d9e83bf560..17322c8fcc 100644 --- a/apps/site/assets/ts/projects/components/ProjectUpdateList.tsx +++ b/apps/site/assets/ts/projects/components/ProjectUpdateList.tsx @@ -1,5 +1,5 @@ import React, { ReactElement } from "react"; -import { SimpleProject as Project } from "./__projects"; +import { Teaser as Project } from "../../__cms"; import formattedDate from "../../helpers/date"; import RoutePillList from "./RoutePillList"; diff --git a/apps/site/assets/ts/projects/components/ProjectsPage.tsx b/apps/site/assets/ts/projects/components/ProjectsPage.tsx index 51b741c447..2d8f07be42 100644 --- a/apps/site/assets/ts/projects/components/ProjectsPage.tsx +++ b/apps/site/assets/ts/projects/components/ProjectsPage.tsx @@ -5,7 +5,7 @@ import FilterAndSearch from "./FilterAndSearch"; import MoreProjectsTable from "./MoreProjectsTable"; import ProjectUpdateList from "./ProjectUpdateList"; import { Mode } from "../../__v3api"; -import { SimpleProject as Project } from "./__projects"; +import { Teaser as Project } from "../../__cms"; interface Props { initialBanner: Project | null; diff --git a/apps/site/assets/ts/projects/components/RoutePillList.tsx b/apps/site/assets/ts/projects/components/RoutePillList.tsx index 156f5768dd..3bfacf53ed 100644 --- a/apps/site/assets/ts/projects/components/RoutePillList.tsx +++ b/apps/site/assets/ts/projects/components/RoutePillList.tsx @@ -1,7 +1,7 @@ import React, { ReactElement } from "react"; import RouteIcon from "./RouteIcon"; import RoutePill from "./RoutePill"; -import { Route } from "./__projects"; +import { Route } from "../../__cms"; import { isSilverLine } from "../../helpers/silver-line"; interface Props {