Skip to content

Commit

Permalink
[OUR415-292] Removes Events and Opportunities from the site (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
rosschapman authored Oct 2, 2024
1 parent f549ec9 commit a7b0310
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 355 deletions.
122 changes: 0 additions & 122 deletions app/components/ui/Cards/OppEventCard.module.scss

This file was deleted.

58 changes: 0 additions & 58 deletions app/components/ui/Cards/OppEventCard.tsx

This file was deleted.

30 changes: 0 additions & 30 deletions app/components/ui/Section/OppEventCardSection.module.scss

This file was deleted.

74 changes: 0 additions & 74 deletions app/components/ui/Section/OppEventCardSection.tsx

This file was deleted.

41 changes: 1 addition & 40 deletions app/hooks/StrapiAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function useFooterData() {

export function useHomepageData() {
return useStrapiHook<HomepageResponse>(
"home-page?populate[hero][populate]=*&populate[category_section][populate]=*&populate[opportunity_section][populate]=*&populate[opportunities][populate][image][populate]=*&populate[opportunities][populate][address]=*&populate[opportunities][populate][links][populate]=*&populate[opportunities][populate][calendar_event]=*&populate[opportunities][populate][opportunity_categories]=*&populate[event_section][populate]=*&populate[events][populate][date]=*&populate[events][populate][address]=*&populate[events][populate][calendar_event]=*&populate[events][populate][links]=*&populate[events][populate][image][populate]=*&populate[events][populate][event_categories]=*&populate[two_column_content_blocks][populate][link]=*&populate[two_column_content_blocks][populate][media][populate]=*"
"home-page?populate[hero][populate]=*&populate[category_section][populate]=*"
);
}

Expand Down Expand Up @@ -233,26 +233,6 @@ export interface TwoColumnContentBlockResponse
faq: FaqItem[];
}

export interface OpportunityResponse extends BaseDatumAttributesResponse {
title: string;
description: string;
calendar_event: CalendarEventResponse;
venue: string;
email: string;
organizer: string;
signup_info: string;
eligibility_info: string;
age_range: string;
target_population: string;
opportunity_categories: Array<StrapiDatumResponse<CategoryResponse>>;
address: AddressResponse;
links: LinkResponse[];
image: {
id: number;
image: StrapiObjectResponse<ImageResponse>;
};
}

export interface CalendarEventResponse {
id: number;
startdate: string;
Expand All @@ -262,21 +242,6 @@ export interface CalendarEventResponse {
recurrence: "none" | "daily" | "weekly" | "monthly" | "yearly";
}

export interface EventResponse extends BaseDatumAttributesResponse {
title: string;
venue: string;
admissions: string;
description: string;
calendar_event: CalendarEventResponse;
address: AddressResponse;
image: {
id: number;
image: StrapiObjectResponse<ImageResponse>;
};
links: LinkResponse[];
event_categories: Array<StrapiDatumResponse<CategoryResponse>>;
}

export interface HomepageResponse extends BaseDatumAttributesResponse {
title: string;
hero: {
Expand All @@ -287,10 +252,6 @@ export interface HomepageResponse extends BaseDatumAttributesResponse {
buttons: LinkResponse[];
};
category_section: ContentBlockResponse;
opportunity_section: ContentBlockResponse;
opportunities: StrapiArrayResponse<OpportunityResponse>;
event_section: ContentBlockResponse;
events: StrapiArrayResponse<EventResponse>;
two_column_content_blocks: StrapiArrayResponse<TwoColumnContentBlockResponse>;
}

Expand Down
4 changes: 0 additions & 4 deletions app/models/Strapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ import {
ContentBlockResponse,
ContentPageResponse,
DynamicLinkResponse,
EventResponse,
FooterResponse,
HeaderResponse,
HomepageResponse,
ImageResponse,
LinkResponse,
LogoResponse,
NavigationMenuResponse,
OpportunityResponse,
StrapiDatumResponse,
TwoColumnContentBlockResponse,
} from "hooks/StrapiAPI";
Expand All @@ -26,8 +24,6 @@ export interface DynamicLink extends Omit<DynamicLinkResponse, "__component"> {}
export interface Footer extends FooterResponse {}
export interface Homepage extends HomepageResponse {}
export interface ContentBlock extends Omit<ContentBlockResponse, "id"> {}
export interface Event extends EventResponse {}
export interface Opportunity extends OpportunityResponse {}
export interface TwoColumnContentBlock extends TwoColumnContentBlockResponse {}
export interface PageContent extends ContentPageResponse {}
export interface Header extends HeaderResponse {}
Expand Down
Loading

0 comments on commit a7b0310

Please sign in to comment.