tinazone commited on
Commit
14a3065
·
verified ·
1 Parent(s): f4647f9

Update pages/index.js

Browse files
Files changed (1) hide show
  1. pages/index.js +0 -18
pages/index.js CHANGED
@@ -92,24 +92,6 @@ export default function Home() {
92
  }
93
  } else {
94
  setIsCapturingGif(false);
95
- // Get the generated GIF file
96
- const gifFile = document.querySelector('a[download="word-to-code-animation.gif"]');
97
- if (gifFile && navigator.share) {
98
- try {
99
- const response = await fetch(gifFile.href);
100
- const blob = await response.blob();
101
- const file = new File([blob], 'animation.gif', { type: 'image/gif' });
102
- await navigator.share({
103
- title: 'Word to Code Animation',
104
- text: 'Check out this animation I created!',
105
- files: [file]
106
- });
107
- } catch (error) {
108
- console.error('Error sharing:', error);
109
- // If sharing fails, fallback to normal download
110
- gifFile.click();
111
- }
112
- }
113
  }
114
  };
115
 
 
92
  }
93
  } else {
94
  setIsCapturingGif(false);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  }
96
  };
97