-
-
Save tfrench15/618ffb30e3e8fdd49eb5da32d2b20831 to your computer and use it in GitHub Desktop.
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
import React from 'react'; | |
import { VERSION } from '@twilio/flex-ui'; | |
import { FlexPlugin } from 'flex-plugin'; | |
import axios from 'axios'; | |
import CustomTaskListContainer from './components/CustomTaskList/CustomTaskList.Container'; | |
import reducers, { namespace } from './states'; | |
const PLUGIN_NAME = 'PersonasPlugin'; | |
export default class PersonasPlugin extends FlexPlugin { | |
constructor() { | |
super(PLUGIN_NAME); | |
} | |
init(flex, manager) { | |
// Fetch the customer's profile data from your Twilio Function. | |
// Now, you can incorporate this data to render your customized | |
// Personas component! | |
axios | |
.get('https://personas-dev-5113.twil.io/welcome') | |
.then((response) => { | |
console.log(response); | |
}) | |
.catch((error) => { | |
console.log(error); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment