Try another path.

This commit is contained in:
Mike Cao 2020-09-26 22:02:10 -07:00
parent 353a49f37a
commit 0935765ac7
2 changed files with 6 additions and 6 deletions

View File

@ -5,6 +5,9 @@
.title { .title {
font-size: var(--font-size-large); font-size: var(--font-size-large);
display: flex;
align-items: center;
line-height: 1.4;
} }
.logo { .logo {
@ -26,11 +29,12 @@
.buttons { .buttons {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center;
} }
@media only screen and (max-width: 992px) { @media only screen and (max-width: 992px) {
.title { .title {
text-align: center; justify-content: center;
} }
.nav { .nav {

View File

@ -3,8 +3,6 @@ import requestIp from 'request-ip';
import { browserName, detectOS } from 'detect-browser'; import { browserName, detectOS } from 'detect-browser';
import isLocalhost from 'is-localhost-ip'; import isLocalhost from 'is-localhost-ip';
import maxmind from 'maxmind'; import maxmind from 'maxmind';
import getConfig from 'next/config';
const { serverRuntimeConfig } = getConfig();
import { import {
DESKTOP_OS, DESKTOP_OS,
@ -63,9 +61,7 @@ export async function getCountry(req, ip) {
} }
// Database lookup // Database lookup
const lookup = await maxmind.open( const lookup = await maxmind.open(path.resolve('./public/geo/GeoLite2-Country.mmdb'));
path.resolve(serverRuntimeConfig.PROJECT_ROOT, 'public/geo/GeoLite2-Country.mmdb'),
);
const result = lookup.get(ip); const result = lookup.get(ip);