This file contains hidden or 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
Step 1: On the front-end, get the 3rd party authentication provider login popup to appear. | |
Step 2: (Still on the front-end) Grab the access token the provider returns after agreeing to login. | |
Step 3: (Yep, still front-end) Send that token to the back-end as part of the input argument of your mutation. | |
Step 4: On the back-end, verify the token. | |
Step 5: If the token is authentic, you will receive the user as part of the verification response (at least that’s the case with Passport.js, which we’ll be using). |
This file contains hidden or 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 * as XLSX from 'xlsx'; | |
import FileSaver from 'file-saver'; | |
// Pass tree: true if want to get excel with multiple pages | |
export const useExportData = (fileName: string, csvData: any, tree?: boolean) => { | |
let ws: XLSX.WorkSheet; | |
const fileType = | |
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8'; | |
const fileExtension = '.xlsx'; |
OlderNewer