- // let getToken = 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhc2NvcGUiOiIxIiwiZXhwIjoxNzI3MzQ0MzQ1LCJpZGVudGl0eSI6OSwibmljZSI6ImxpdWoiLCJvcmlnX2lhdCI6MTcyNzM0MDc0NSwicm9sZWlkIjoxLCJyb2xla2V5IjoiYWRtaW4iLCJyb2xlbmFtZSI6Iuezu-e7n-euoeeQhuWRmCJ9.n1CTya_M5Cc07y9cZ96G_EFIrzo1tpHVIrtqxx1Vg98'
- let getToken = ''
- function getCookie () {
- const cookies = document && document.cookie && document.cookie.split(';');
- if (cookies) {
- const tempData = cookies.find(cookie => cookie.trim().startsWith('Admin-Token='))
- if (tempData) {
- const sharedData = tempData.split('=')[1];
- getToken= 'Bearer ' + sharedData
- }
- }
- }
- getCookie()
- export default getToken
|