SHARE
TWEET

Untitled

a guest Jun 25th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const tabsView = {
  2.   generalConfig: {
  3.     isTemplates: false,
  4.     isFolders: false,
  5.     isAiTemplates: false
  6.   },
  7.   templates: ({ isTemplates }) => ({
  8.     ...this.generalConfig,
  9.     isTemplates: !isTemplates
  10.   }),
  11.   folders: ({ isFolders }) => ({
  12.     ...this.generalConfig,
  13.     isFolders: !isFolders
  14.   }),
  15.   aiTemplates: ({ isAiTemplates }) => ({
  16.     ...this.generalConfig,
  17.     isAiTemplates: !isAiTemplates
  18.   }) // if needed rewrite isFolders
  19. };
  20.  
  21. this.setState(tabsView[data]);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top