Skip to content

Commit 0889982

Browse files
committed
Add toast to copy
1 parent ce7b9d1 commit 0889982

File tree

4 files changed

+6
-43
lines changed

4 files changed

+6
-43
lines changed

components/Output.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import toast from 'react-hot-toast';
21
import { highlight, Grammar } from 'prismjs';
32
import Editor from 'react-simple-code-editor';
43
import { DuplicateIcon } from '@heroicons/react/outline';
4+
import { toast } from 'react-toastify';
55

66
type OutputProps = {
77
output: string;

package-lock.json

+4-40
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"prismjs": "^1.26.0",
1818
"react": "17.0.2",
1919
"react-dom": "17.0.2",
20-
"react-hot-toast": "^2.1.1",
2120
"react-simple-code-editor": "^0.11.0",
2221
"react-toastify": "^8.1.0"
2322
},

pages/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export default function Example() {
164164
setOutputDisplay(docstring);
165165
} catch (error: any) {
166166
const errorMessage = error?.response?.data?.error || 'An enexpected error occurred';
167-
toast(errorMessage);
167+
toast.error(errorMessage);
168168
} finally {
169169
setIsGenerating(false);
170170
}

0 commit comments

Comments
 (0)