Last active
April 16, 2019 07:27
-
-
Save kaleem-elahi/7594ede2e3732253c78349dd2c2f17a4 to your computer and use it in GitHub Desktop.
Function that help in managing multi-tenant conditions, So, RenderByTenantFunc
This file contains hidden or 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
| import { RenderByTenantFunc } from 'RenderByTenantFunc'; | |
| RenderByTenantFunc(() => { | |
| // Add ERG statements | |
| }, () => { | |
| // Add WP statements | |
| }); |
This file contains hidden or 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
| export const RenderByTenantFunc = (erg, wp) => (tenant === 'WP' ? wp() : erg()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment