add first custom component

This commit is contained in:
2025-07-01 01:03:43 +07:00
parent 695b5b149f
commit bd71eee8fd
5 changed files with 129 additions and 96 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ export const downloadData = (data: string) => {
downloadFile(b, 'teams_qr_code.pdf', 'application/pdf;teams_qr_code.pdf')
}
export const base64ToBytes = (base64: string): Uint8Array => {
const base64ToBytes = (base64: string): Uint8Array => {
const binaryString = atob(base64);
const bytes = new Uint8Array(binaryString.length);
for (let i = 0; i < binaryString.length; i++) {
@@ -32,7 +32,7 @@ export const base64ToBytes = (base64: string): Uint8Array => {
return bytes;
}
export const downloadFile = (bytes: Uint8Array, fileName: string, mimeType: string) => {
const downloadFile = (bytes: Uint8Array, fileName: string, mimeType: string) => {
const blob = new Blob([bytes], { type: mimeType });
const url = URL.createObjectURL(blob);
const link = document.createElement('a');