rm unused after migrate to api

This commit is contained in:
tmshv committed 2020-02-15 04:35:19 +03:00
1 parent f3febbe3a9
commit 4de352e2df
25 files changed
-1149

No files matched your search

-19
View File
@@ -34,22 +34,3 @@ export function wrapInitialProps(fn: (ctx: NextPageContext) => void) {
export function createApiUrl(path: string) {
return `https://api.tmshv.com/hudozka${path}`
}
function absoluteUrl(req, defaultLocalhost) {
let protocol = 'https:'
let host = req
? (req.headers['x-forwarded-host'] || req.headers['host'])
: window.location.host
host = host || defaultLocalhost
if (host.indexOf('localhost') > -1) {
if (defaultLocalhost) host = defaultLocalhost
protocol = 'http:'
}
const origin = protocol + '//' + host
return {
protocol,
host,
origin,
}
}