From ff2f89d82a2f16fd66bdf4fe54eb1a2ad34325b1 Mon Sep 17 00:00:00 2001 From: Bram Suurd <78373894+BramSuurdje@users.noreply.github.com> Date: Sat, 13 Jul 2024 23:46:48 +0200 Subject: [PATCH] Add toast when first copying scripts to warn user --- components/ScriptItem.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/components/ScriptItem.tsx b/components/ScriptItem.tsx index 46a18d7..4149002 100644 --- a/components/ScriptItem.tsx +++ b/components/ScriptItem.tsx @@ -101,6 +101,13 @@ function ScriptItem({ if (amountOfScriptsCopied === null) { localStorage.setItem("amountOfScriptsCopied", "1"); + setTimeout(() => { + toast.error( + "be careful when copying scripts from the internet. Always remember check the source!", + { duration: 8000 }, + ); + } + , 500); } else { amountOfScriptsCopied = (parseInt(amountOfScriptsCopied) + 1).toString(); localStorage.setItem("amountOfScriptsCopied", amountOfScriptsCopied); @@ -299,7 +306,7 @@ function ScriptItem({
{item.website && ( - )} {item.documentation && ( - )} {item.post_install && ( - )} {sourceUrl && ( -