Skip to content

Commit

Permalink
refactor: remove old gallery work
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgoff committed Dec 13, 2024
1 parent a6ad221 commit d7670bb
Show file tree
Hide file tree
Showing 17 changed files with 3 additions and 598 deletions.
1 change: 0 additions & 1 deletion app/[locale]/[...uriSegments]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ export async function generateStaticParams({

const sectionMap = {
events: EventPageTemplate,
// galleryItems: GalleryPageTemplate,
glossaryTerms: GlossaryPageTemplate,
news: NewsPageTemplate,
searchResults: SearchPageTemplate,
Expand Down
8 changes: 1 addition & 7 deletions components/content-blocks/SlideBlock/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ const SlideBlock = ({

// get manually-curated data first. This has some filtering for missing entries (deleted in craft)
let allItems = [];
if (dynamicComponent === "galleryItems") {
allItems = normalizeItemData(items, "galleryEntry");
} else if (dynamicComponent === "staffProfiles") {
if (dynamicComponent === "staffProfiles") {
allItems = normalizeItemData(items, "staffEntry");
truncate = 50;
}
Expand Down Expand Up @@ -74,10 +72,6 @@ const SlideBlock = ({
const makePretitle = (cat, type) => {
if (type === "slideshow") {
return t(`gallery.slideshow`);
} else if (type === "galleryItem") {
return cat?.[0]?.slug
? t(`gallery.${cat[0].slug}`)
: t(`gallery.gallery`);
}
return null;
};
Expand Down
1 change: 0 additions & 1 deletion components/dynamic/DataList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const DataList = ({
const listTypeMap = {
newsPosts: "news-post",
pressReleases: "press-release",
imageGalleryItems: "image",
videoGalleryItems: "video",
};
const listType = categories.find((c) => c.slug === listTypeMap[component]);
Expand Down
35 changes: 0 additions & 35 deletions components/dynamic/GalleryList/index.js

This file was deleted.

28 changes: 0 additions & 28 deletions components/dynamic/SearchList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,33 +45,6 @@ const SearchList = ({
};
let customBreadcrumbs;

if (entry.typeHandle === "galleryItem") {
customBreadcrumbs = makeCustomBreadcrumbs(rootPages, "Gallery");
// add category strings and pre-filtered crumb: id, title, uri
let typeId = "";
let typeTitlePlural = "";
let typeSlug = "gallery";

if (entry.galleryItemCategory.length > 0) {
typeId = entry.galleryItemCategory[0].id;
typeTitlePlural = t(
`gallery.plural-${entry.galleryItemCategory[0].slug}`
);
typeSlug = entry.galleryItemCategory[0].slug;

customBreadcrumbs.push({
id: typeId,
title: typeTitlePlural,
uri: `gallery/gallery-search?filter=${typeId}`,
});
}
return (
<Breadcrumbs
breadcrumbs={[...customBreadcrumbs, pageLink]}
type="search"
/>
);
}
if (entry.typeHandle === "slideshow") {
customBreadcrumbs = makeCustomBreadcrumbs(rootPages, "Slideshows");
return (
Expand All @@ -89,7 +62,6 @@ const SearchList = ({

const makeSubtitle = (entry) => {
const type = {
galleryItem: t("gallery.gallery-item"),
slideshow: t("gallery.slideshow"),
events: t("events.event"),
job: t("jobs.job"),
Expand Down
2 changes: 0 additions & 2 deletions components/dynamic/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import EventList from "./EventList";
import GalleryList from "./GalleryList";
import JobList from "./JobList";
import NewsList from "./NewsList";
import RelatedList from "./RelatedList";
Expand All @@ -12,7 +11,6 @@ export default {
EventList,
JobList,
NewsList,
GalleryList,
RelatedList,
SearchList,
SlideshowList,
Expand Down
4 changes: 0 additions & 4 deletions components/factories/DynamicComponentFactory.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import PropTypes from "prop-types";
import EventList from "@/components/dynamic/EventList";
import GalleryList from "@/dynamic/GalleryList";
import JobList from "@/dynamic/JobList";
import NewsList from "@/dynamic/NewsList";
import RelatedList from "@/dynamic/RelatedList";
Expand All @@ -13,9 +12,6 @@ import GlossaryList from "@/dynamic/GlossaryList";
const componentMap = {
alertStream: TempList,
events: EventList,
galleryItems: GalleryList,
imageGalleryItems: GalleryList,
videoGalleryItems: GalleryList,
jobs: JobList,
news: NewsList,
newsPosts: NewsList,
Expand Down
14 changes: 0 additions & 14 deletions components/page/Aside/patterns/Media/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,6 @@ export default function MediaAside({
</Figure>
</Link>
);
} else if (a.galleryItem?.length > 0) {
if (a.galleryItem[0].uri) {
return (
<Link
prefetch={false}
href={`/${a.galleryItem[0].uri}`}
key={i}
>
<ResponsiveImage
image={a.galleryItem[0].representativeAssetVariant[0]}
/>
</Link>
);
}
}
})}
</AsideSection>
Expand Down
1 change: 0 additions & 1 deletion components/page/FilterBar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const FilterBar = ({ filterType, setLiveRegionMessage }) => {
const { categories } = useGlobalData();
const filterMap = {
events: "eventFilters",
galleryItems: "galleryTypes",
jobs: "jobTypes",
news: "newsFilters",
staffProfiles: "staffFilters",
Expand Down
Loading

0 comments on commit d7670bb

Please sign in to comment.