Skip to content

Instantly share code, notes, and snippets.

@kaleem-elahi
Last active April 16, 2019 07:27
Show Gist options
  • Select an option

  • Save kaleem-elahi/7594ede2e3732253c78349dd2c2f17a4 to your computer and use it in GitHub Desktop.

Select an option

Save kaleem-elahi/7594ede2e3732253c78349dd2c2f17a4 to your computer and use it in GitHub Desktop.
Function that help in managing multi-tenant conditions, So, RenderByTenantFunc
import { RenderByTenantFunc } from 'RenderByTenantFunc';
RenderByTenantFunc(() => {
// Add ERG statements
}, () => {
// Add WP statements
});
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