Skip to content

Instantly share code, notes, and snippets.

@tfrench15
Created April 14, 2021 04:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tfrench15/618ffb30e3e8fdd49eb5da32d2b20831 to your computer and use it in GitHub Desktop.
Save tfrench15/618ffb30e3e8fdd49eb5da32d2b20831 to your computer and use it in GitHub Desktop.
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