-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c8b5ced
commit e99ee55
Showing
14 changed files
with
107 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 9 additions & 3 deletions
12
src/universal/core/apiService/apiManager/ClientApiManager.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import Cookies from 'js-cookie'; | ||
|
||
const appConfig = require('__APP_CONFIG__'); | ||
|
||
const domain = appConfig.cookieStorageUrl; | ||
|
||
export default class CookieService { | ||
static setItem(key, value, options) { | ||
Cookies.set(key, value, { domain, ...options }); | ||
} | ||
|
||
static getItem(key) { | ||
return Cookies.get(key); | ||
} | ||
|
||
static getAllItems() { | ||
return Cookies.get(); | ||
} | ||
|
||
static getJSON(key) { | ||
return Cookies.getJSON(key); | ||
} | ||
|
||
static removeItem(key, options) { | ||
Cookies.remove(key, { domain, ...options }); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import Preview from '../components/Preview'; | ||
import { isPreview } from '../service/RenderService'; | ||
|
||
const previewPages = require('__V_PREVIEW__'); | ||
|
||
const getPreviewLayout = query => { | ||
if (isPreview(query)) { | ||
return query?.preview; | ||
} | ||
|
||
return ''; | ||
}; | ||
|
||
export const getPreviewFile = query => { | ||
const layoutName = getPreviewLayout(query); | ||
const { previewLayouts = {} } = previewPages?.default || {}; | ||
let PreviewFile = Preview; | ||
|
||
if (previewLayouts[layoutName]) { | ||
PreviewFile = previewLayouts[layoutName]; | ||
} else if (previewLayouts.default) { | ||
PreviewFile = previewLayouts.default; | ||
} | ||
|
||
return PreviewFile; | ||
}; |