Skip to content

Commit 0ba6657

Browse files
committed
added-Community-snapshots
1 parent 8adbf4b commit 0ba6657

File tree

6 files changed

+5
-6
lines changed

6 files changed

+5
-6
lines changed

frontend/__tests__/unit/pages/SnapshotDetails.test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import { addToast } from '@heroui/toast'
33
import { fireEvent, screen, waitFor } from '@testing-library/react'
44
import { mockSnapshotDetailsData } from '@unit/data/mockSnapshotData'
55
import { render } from 'wrappers/testUtil'
6-
import SnapshotDetailsPage from 'app/snapshots/[id]/page'
7-
6+
import SnapshotDetailsPage from 'app/community/snapshots/[id]/page'
87
jest.mock('@apollo/client/react', () => ({
98
...jest.requireActual('@apollo/client/react'),
109
useQuery: jest.fn(),

frontend/__tests__/unit/pages/Snapshots.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { addToast } from '@heroui/toast'
33
import { screen, waitFor, fireEvent } from '@testing-library/react'
44
import { act } from 'react'
55
import { render } from 'wrappers/testUtil'
6-
import SnapshotsPage from 'app/snapshots/page'
6+
import SnapshotsPage from 'app/community/snapshots/page'
77

88
const mockRouter = {
99
push: jest.fn(),

frontend/src/app/snapshots/[id]/layout.tsx renamed to frontend/src/app/community/snapshots/[id]/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export async function generateMetadata({
1818

1919
return snapshot
2020
? generateSeoMetadata({
21-
canonicalPath: `/snapshots/${snapshotKey}`,
21+
canonicalPath: `/community/snapshots/${snapshotKey}`,
2222
description: `${snapshot?.title} details.`,
2323
keywords: ['owasp', 'snapshot', snapshotKey, snapshot?.title],
2424
title: snapshot?.title,

frontend/src/app/snapshots/layout.tsx renamed to frontend/src/app/community/snapshots/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import { getStaticMetadata } from 'utils/metaconfig'
33

4-
export const metadata = getStaticMetadata('snapshots', '/snapshots')
4+
export const metadata = getStaticMetadata('snapshots', '/community/snapshots')
55

66
export default function SnapshotsLayout({ children }: { children: React.ReactNode }) {
77
return children

frontend/src/app/snapshots/page.tsx renamed to frontend/src/app/community/snapshots/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const SnapshotsPage: React.FC = () => {
3636
const router = useRouter()
3737

3838
const handleButtonClick = (snapshot: Snapshot) => {
39-
router.push(`/snapshots/${snapshot.key}`)
39+
router.push(`/community/snapshots/${snapshot.key}`)
4040
}
4141

4242
const renderSnapshotCard = (snapshot: Snapshot) => {

0 commit comments

Comments
 (0)