File tree Expand file tree Collapse file tree 5 files changed +62
-0
lines changed
Expand file tree Collapse file tree 5 files changed +62
-0
lines changed Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 1+ import styles from "./data.module.css" ;
2+
3+ export const data = {
4+ now : Date . now ( ) ,
5+ styles,
6+ } ;
Original file line number Diff line number Diff line change 1+ .wrap {
2+ display : flex;
3+ }
You can’t perform that action at this time.
0 commit comments