Skip to content

Commit 559127c

Browse files
committed
update
1 parent 0b08fe5 commit 559127c

37 files changed

+10045
-16322
lines changed

.babelrc

Lines changed: 0 additions & 14 deletions
This file was deleted.

dist-functions/admin.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

example.http

Whitespace-only changes.

middleware.js

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,33 @@ import { MiddlewareRequest } from '@netlify/next';
22

33
export async function middleware(nextRequest) {
44

5-
if (nextRequest.nextUrl.pathname !== '/signup') {
6-
return;
7-
}
5+
return;
6+
// if (nextRequest.nextUrl.pathname !== '/signup') {
7+
// return;
8+
// }
89

9-
const middlewareRequest = new MiddlewareRequest(nextRequest);
10-
const response = await middlewareRequest.next();
10+
// const middlewareRequest = new MiddlewareRequest(nextRequest);
11+
// const response = await middlewareRequest.next();
1112

12-
const GOOGLE_API_KEY = Deno.env.get('NEXT_PUBLIC_GOOGLE_API_KEY');
13-
const address = nextRequest.cookies.get('state');
14-
const country = nextRequest.cookies.get('country') ?? '';
13+
// const GOOGLE_API_KEY = Deno.env.get('NEXT_PUBLIC_GOOGLE_API_KEY');
14+
// const address = nextRequest.cookies.get('state');
15+
// const country = nextRequest.cookies.get('country') ?? '';
1516

16-
const api = new URL('https://maps.googleapis.com/maps/api/geocode/json');
17+
// const api = new URL('https://maps.googleapis.com/maps/api/geocode/json');
1718

18-
api.searchParams.set('address', `${address}${country}`);
19-
api.searchParams.set('key', GOOGLE_API_KEY);
19+
// api.searchParams.set('address', `${address}${country}`);
20+
// api.searchParams.set('key', GOOGLE_API_KEY);
2021

21-
const res = await fetch(api.toString());
22-
const data = await res.json();
23-
const [result] = data.results;
22+
// const res = await fetch(api.toString());
23+
// const data = await res.json();
24+
// const [result] = data.results;
2425

25-
if (!result || !result.geometry || !result.geometry.location) {
26-
return;
27-
}
26+
// if (!result || !result.geometry || !result.geometry.location) {
27+
// return;
28+
// }
2829

29-
response.setPageProp('address', address);
30-
response.setPageProp('mapCords', result.geometry.location);
30+
// response.setPageProp('address', address);
31+
// response.setPageProp('mapCords', result.geometry.location);
3132

32-
return response;
33+
// return response;
3334
}

next.config.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
const path = require('path')
2-
const withSass = require('@zeit/next-sass');
3-
4-
module.exports = withSass({
5-
cssModules: true,
6-
reactStrictMode: true,
7-
distDir: 'build',
8-
})
92

103
module.exports = {
114
sassOptions: {
125
includePaths: [path.join(__dirname, 'styles')],
136
},
147
images: {
158
domains: ['localhost', 'optimizely-demo.netlify.app'],
9+
},
10+
experimental: {
11+
appDir: true,
1612
}
1713
}

0 commit comments

Comments
 (0)