Skip to content

Commit ca02fb4

Browse files
committed
Add pages testing the deployement id
1 parent 98f1d38 commit ca02fb4

File tree

5 files changed

+62
-0
lines changed

5 files changed

+62
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"use client";
2+
3+
import Link from "next/link";
4+
import Image from "next/image";
5+
import testImage from "../../public/test.jpg";
6+
7+
export default function Page() {
8+
return (
9+
<>
10+
<p>hello app</p>
11+
<Image src={testImage} alt="test" />
12+
<p id="deploymentId">{process.env.NEXT_DEPLOYMENT_ID}</p>
13+
14+
<button
15+
onClick={() => {
16+
import("../../data").then((mod) => {
17+
console.log("loaded data", mod);
18+
});
19+
}}
20+
id="dynamic-import"
21+
>
22+
click me
23+
</button>
24+
<Link id="other-app" href="/other-app">
25+
other app
26+
</Link>
27+
</>
28+
);
29+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
"use client";
2+
import testImage from "../../public/test.jpg";
3+
import Image from "next/image";
4+
5+
export default function Page() {
6+
return (
7+
<>
8+
<h1>other app</h1>
9+
<Image src={testImage} alt="test" />
10+
<p id="deploymentId">{process.env.NEXT_DEPLOYMENT_ID}</p>
11+
12+
<button
13+
onClick={() => {
14+
import("../../data").then((mod) => {
15+
console.log("loaded data", mod);
16+
});
17+
}}
18+
id="dynamic-import"
19+
>
20+
click me
21+
</button>
22+
</>
23+
);
24+
}

examples/playground15/data.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import styles from "./data.module.css";
2+
3+
export const data = {
4+
now: Date.now(),
5+
styles,
6+
};

examples/playground15/data.module.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.wrap {
2+
display: flex;
3+
}

examples/playground15/public/test.jpg

6.61 KB
Loading

0 commit comments

Comments
 (0)