Skip to content

Commit

Permalink
Updated dependencies and reverted image gallery route interception wo…
Browse files Browse the repository at this point in the history
…rkaround
  • Loading branch information
pookmish committed Dec 11, 2024
1 parent 4a184f9 commit 3fb0bca
Show file tree
Hide file tree
Showing 5 changed files with 306 additions and 310 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import {graphqlClient} from "@lib/gql/gql-client"
import {notFound} from "next/navigation"

type Props = {
params: Promise<{uuid: string}>
params: Promise<{uuid: string[]}>
}

const Page = async (props: Props) => {
const params = await props.params
const [paragraphId, mediaUuid] = decodeURIComponent(params.uuid).split(":")
const [paragraphId, mediaUuid] = params.uuid

const paragraphQuery = await graphqlClient().Paragraph({uuid: paragraphId})
if (paragraphQuery.paragraph?.__typename !== "ParagraphStanfordGallery") notFound()
Expand Down Expand Up @@ -58,7 +58,7 @@ const Page = async (props: Props) => {
<li className="mr-auto">
<Link
className="text-white no-underline hocus:text-white hocus:underline"
href={`/gallery/${paragraph.id}:${paragraph.suGalleryImages?.[prevImageIndex].id}`}
href={`/gallery/${paragraph.id}/${paragraph.suGalleryImages?.[prevImageIndex].id}`}
replace={true}
scroll={false}
>
Expand All @@ -70,7 +70,7 @@ const Page = async (props: Props) => {
<li className="ml-auto">
<Link
className="text-white no-underline hocus:text-white hocus:underline"
href={`/gallery/${paragraph.id}:${paragraph.suGalleryImages?.[nextImageIndex].id}`}
href={`/gallery/${paragraph.id}/${paragraph.suGalleryImages?.[nextImageIndex].id}`}
replace={true}
scroll={false}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ export const metadata = {
}

type Props = {
params: Promise<{uuid: string}>
params: Promise<{uuid: string[]}>
}

const Page = async (props: Props) => {
const params = await props.params
const [paragraphId, mediaUuid] = decodeURIComponent(params.uuid).split(":")
const [paragraphId, mediaUuid] = params.uuid

const paragraphQuery = await graphqlClient().Paragraph({uuid: paragraphId})
if (paragraphQuery.paragraph?.__typename !== "ParagraphStanfordGallery") notFound()
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
},
"dependencies": {
"@heroicons/react": "^2.2.0",
"@mui/base": "5.0.0-beta.64",
"@next/third-parties": "15.0.4",
"@mui/base": "5.0.0-beta.66",
"@next/third-parties": "15.1.0",
"@tailwindcss/container-queries": "^0.1.1",
"@types/node": "^22.10.1",
"@types/node": "^22.10.2",
"@types/react": "^19.0.1",
"@types/react-dom": "19.0.1",
"algoliasearch": "^5.16.0",
"@types/react-dom": "19.0.2",
"algoliasearch": "^5.17.0",
"autoprefixer": "^10.4.20",
"clsx": "^2.1.1",
"decanter": "^7.3.0",
Expand All @@ -31,7 +31,7 @@
"graphql-tag": "^2.12.6",
"html-entities": "^2.5.2",
"html-react-parser": "^5.2.0",
"next": "15.0.4",
"next": "15.1.0",
"postcss": "^8.4.49",
"qs": "^6.13.1",
"react": "19.0.0",
Expand All @@ -40,7 +40,7 @@
"react-error-boundary": "^4.1.2",
"react-focus-lock": "^2.13.2",
"react-instantsearch": "^7.13.9",
"react-instantsearch-nextjs": "^0.3.19",
"react-instantsearch-nextjs": "^0.3.20",
"react-slick": "^0.30.2",
"react-super-responsive-table": "^6.0.0",
"react-tiny-oembed": "^1.1.0",
Expand All @@ -58,7 +58,7 @@
"@graphql-codegen/import-types-preset": "^3.0.0",
"@graphql-codegen/typescript-graphql-request": "^6.2.0",
"@graphql-codegen/typescript-operations": "^4.4.0",
"@next/bundle-analyzer": "15.0.4",
"@next/bundle-analyzer": "15.1.0",
"@storybook/addon-essentials": "^8.4.7",
"@storybook/addon-interactions": "^8.4.7",
"@storybook/addon-links": "^8.4.7",
Expand All @@ -72,7 +72,7 @@
"concurrently": "^9.1.0",
"encoding": "^0.1.13",
"eslint": "^9.16.0",
"eslint-config-next": "15.0.4",
"eslint-config-next": "15.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-storybook": "^0.11.1",
Expand All @@ -82,7 +82,7 @@
"storybook": "^8.4.7",
"storybook-addon-module-mock": "^1.3.4",
"tsconfig-paths-webpack-plugin": "^4.2.0",
"typescript-eslint": "^8.17.0"
"typescript-eslint": "^8.18.0"
},
"packageManager": "[email protected]",
"resolutions": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const GalleryImage = ({
<li {...props}>
<figure className="h-full w-full">
<Link
href={`/gallery/${galleryId}:${image.id}`}
href={`/gallery/${galleryId}/${image.id}`}
className={twMerge(
"relative block h-full w-full overflow-hidden border-5 border-white transition-colors hover:border-cardinal-red focus-visible:border-cardinal-red hocus:outline-none",
linkClasses
Expand Down
Loading

0 comments on commit 3fb0bca

Please sign in to comment.