Skip to content

Commit 9a14f58

Browse files
examples: fix view source pathname at image-legacy-component (#73414)
## Description #73344 updates the [image-legacy-component](https://github.com/vercel/next.js/tree/canary/examples/image-legacy-component) example for using the App Router. However, [`ViewSource`](https://github.com/vercel/next.js/blob/canary/examples/image-legacy-component/components/view-source.tsx) component isn't updated. Then I update the pathname. CC: @samcx ### Adding or Updating Examples - [x] The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - [x] Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md Co-authored-by: Sam Ko <[email protected]>
1 parent 9d371bf commit 9a14f58

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

examples/image-legacy-component/app/background/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import styles from "@/styles/styles.module.css";
55
export default function Background() {
66
return (
77
<div>
8-
<ViewSource pathname="pages/background.tsx" />
8+
<ViewSource pathname="app/background/page.tsx" />
99
<div className={styles.bgWrap}>
1010
<Image
1111
alt="Mountains"

examples/image-legacy-component/app/color/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const rgbDataURL = (r: number, g: number, b: number) =>
1919
export default function Color() {
2020
return (
2121
<div>
22-
<ViewSource pathname="pages/color.tsx" />
22+
<ViewSource pathname="app/color/page.tsx" />
2323
<h1>Image Component With Color Data URL</h1>
2424
<Image
2525
alt="Dog"

examples/image-legacy-component/app/layout-fill/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import ViewSource from "@/components/view-source";
44
export default function LayoutFill() {
55
return (
66
<div>
7-
<ViewSource pathname="pages/layout-fill.tsx" />
7+
<ViewSource pathname="app/layout-fill/page.tsx" />
88
<h1>Image Component With Layout Fill</h1>
99
<div style={{ position: "relative", width: "300px", height: "500px" }}>
1010
<Image

examples/image-legacy-component/app/layout-fixed/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import ViewSource from "@/components/view-source";
44
export default function LayoutFixed() {
55
return (
66
<div>
7-
<ViewSource pathname="pages/layout-fixed.tsx" />
7+
<ViewSource pathname="app/layout-fixed/page.tsx" />
88
<h1>Image Component With Layout Fixed</h1>
99
<Image
1010
alt="Mountains"

examples/image-legacy-component/app/layout-intrinsic/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import ViewSource from "@/components/view-source";
44
export default function LayoutIntrinsic() {
55
return (
66
<div>
7-
<ViewSource pathname="pages/layout-intrinsic.tsx" />
7+
<ViewSource pathname="app/layout-intrinsic/page.tsx" />
88
<h1>Image Component With Layout Intrinsic</h1>
99
<Image
1010
alt="Mountains"

examples/image-legacy-component/app/layout-responsive/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import ViewSource from "@/components/view-source";
44
export default function LayoutResponsive() {
55
return (
66
<div>
7-
<ViewSource pathname="pages/layout-responsive.tsx" />
7+
<ViewSource pathname="app/layout-responsive/page.tsx" />
88
<h1>Image Component With Layout Responsive</h1>
99
<Image
1010
alt="Mountains"

examples/image-legacy-component/app/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import styles from "@/styles/styles.module.css";
77
export default function Home() {
88
return (
99
<div className={styles.container}>
10-
<ViewSource pathname="pages/index.tsx" />
10+
<ViewSource pathname="app/page.tsx" />
1111
<div className={styles.card}>
1212
<h1>Image Component with Next.js</h1>
1313
<p>

examples/image-legacy-component/app/placeholder/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import mountains from "@/public/mountains.jpg";
55
export default function Placeholder() {
66
return (
77
<div>
8-
<ViewSource pathname="pages/placeholder.tsx" />
8+
<ViewSource pathname="app/placeholder/page.tsx" />
99
<h1>Image Component With Placeholder Blur</h1>
1010
<Image
1111
alt="Mountains"

examples/image-legacy-component/app/shimmer/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const toBase64 = (str: string) =>
2323
export default function Shimmer() {
2424
return (
2525
<div>
26-
<ViewSource pathname="pages/shimmer.tsx" />
26+
<ViewSource pathname="app/shimmer/page.tsx" />
2727
<h1>Image Component With Shimmer Data URL</h1>
2828
<Image
2929
alt="Mountains"

0 commit comments

Comments
 (0)