File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export async function middleware(request: NextRequest) {
56
56
// Unlike NextResponse.next(), this actually sends the request to the origin
57
57
const res = await NetlifyResponse . next ( request )
58
58
res . transformData ( ( data ) => {
59
- data . pageProps . message = `This was static but has been transformed in ${ request . geo . country } `
59
+ data . pageProps . message = `This was static but has been transformed in ${ request . geo . city } `
60
60
data . pageProps . showAd = true
61
61
return data
62
62
} )
Original file line number Diff line number Diff line change 1
1
const Page = ( { message, showAd } ) => (
2
2
< div >
3
3
< p > { message } </ p >
4
- { showAd ? < div > This is an ad that isn't shown by default</ div > : < p > No ads for me</ p > }
4
+ { showAd ? (
5
+ < div >
6
+ < p > This is an ad that isn't shown by default</ p >
7
+ < img src = "http://placekitten.com/400x300" />
8
+ </ div >
9
+ ) : (
10
+ < p > No ads for me</ p >
11
+ ) }
5
12
</ div >
6
13
)
7
14
You can’t perform that action at this time.
0 commit comments