Skip to content

Commit

Permalink
Revert gallery changes
Browse files Browse the repository at this point in the history
Revert gallery changes
  • Loading branch information
ericdrosas87 committed Jan 14, 2025
1 parent 2b3e5da commit d81bd89
Show file tree
Hide file tree
Showing 82 changed files with 650 additions and 60,686 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

# testing
/coverage
/cypress/screenshots

# next.js
/.next/
Expand Down Expand Up @@ -38,4 +37,4 @@ env files
.vscode

# storybook
/storybook-static/*
/storybook-static/*
12 changes: 5 additions & 7 deletions app/[locale]/[...uriSegments]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ const pickFeaturedImage = async (
};

export async function generateMetadata(
{
params: { locale, uriSegments },
searchParams = {},
}: WithSearchParams<UriSegmentProps>,
{ params: { locale, uriSegments }, searchParams = {} }: UriSegmentProps,
parent: ResolvingMetadata
): Promise<Metadata> {
const uri = uriSegments.join("/");
Expand Down Expand Up @@ -112,9 +109,10 @@ const sectionMap = {
staffProfiles: StaffPageTemplate,
};

const UriSegmentsPage: FunctionComponent<
WithSearchParams<UriSegmentProps>
> = async ({ params: { locale, uriSegments }, searchParams }) => {
const UriSegmentsPage: FunctionComponent<UriSegmentProps> = async ({
params: { locale, uriSegments },
searchParams,
}) => {
const uri = uriSegments.join("/");
let previewToken: string | undefined;

Expand Down
42 changes: 0 additions & 42 deletions app/[locale]/gallery/[gallery]/[asset]/layout.tsx

This file was deleted.

101 changes: 0 additions & 101 deletions app/[locale]/gallery/[gallery]/[asset]/page.tsx

This file was deleted.

43 changes: 0 additions & 43 deletions app/[locale]/gallery/[gallery]/layout.tsx

This file was deleted.

49 changes: 0 additions & 49 deletions app/[locale]/gallery/[gallery]/page.tsx

This file was deleted.

21 changes: 9 additions & 12 deletions app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { FunctionComponent, PropsWithChildren, Suspense } from "react";
import { Metadata } from "next";
import { notFound } from "next/navigation";
import { GoogleOAuthProvider } from "@react-oauth/google";
import { GlobalStyles } from "@rubin-epo/epo-react-lib/styles";
import { getGlobalData } from "@/lib/api/globals";
Expand All @@ -11,7 +10,7 @@ import I18NextClientProvider from "@/contexts/i18next";
import { AuthenticationContextProvider } from "@/contexts/Authentication";
import PageWrapper from "@/components/organisms/PageWrapper";
import RootScripts from "./scripts";
import { HistoryProvider } from "@/contexts/History";
import { notFound } from "next/navigation";

const GOOGLE_APP_ID = process.env.NEXT_PUBLIC_GOOGLE_APP_ID || "";

Expand Down Expand Up @@ -81,16 +80,14 @@ const LocaleLayout: FunctionComponent<PropsWithChildren<LocaleProps>> = async ({
<body className={SourceSansPro.variable}>
<I18NextClientProvider {...{ locale }}>
<Suspense>
<HistoryProvider>
<AuthenticationContextProvider>
<StyledComponentsRegistry>
<GoogleOAuthProvider clientId={GOOGLE_APP_ID}>
<GlobalStyles />
<PageWrapper {...{ locale }}>{children}</PageWrapper>
</GoogleOAuthProvider>
</StyledComponentsRegistry>
</AuthenticationContextProvider>
</HistoryProvider>
<AuthenticationContextProvider>
<StyledComponentsRegistry>
<GoogleOAuthProvider clientId={GOOGLE_APP_ID}>
<GlobalStyles />
<PageWrapper {...{ locale }}>{children}</PageWrapper>
</GoogleOAuthProvider>
</StyledComponentsRegistry>
</AuthenticationContextProvider>
</Suspense>
</I18NextClientProvider>
<RootScripts {...{ locale }} />
Expand Down
4 changes: 2 additions & 2 deletions app/[locale]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import HomePageTemplate from "@/templates/HomePage";
export async function generateMetadata({
params: { locale },
searchParams = {},
}: WithSearchParams<LocaleProps>): Promise<Metadata> {
}: LocaleProps): Promise<Metadata> {
let previewToken: string | undefined;

if (draftMode().isEnabled) {
Expand All @@ -24,7 +24,7 @@ export async function generateMetadata({
return { title, description };
}

const RootPage: FunctionComponent<WithSearchParams<LocaleProps>> = async ({
const RootPage: FunctionComponent<LocaleProps> = async ({
params: { locale },
searchParams = {},
}) => {
Expand Down
Loading

0 comments on commit d81bd89

Please sign in to comment.