From 3c3612522dae0560bdb708868a423bf7c7431ed2 Mon Sep 17 00:00:00 2001
From: Mykola <53128883+Nikolaus-B@users.noreply.github.com>
Date: Sun, 18 Feb 2024 02:03:15 +0200
Subject: [PATCH] add toast, more styles
---
package-lock.json | 38 +++++++++++++++++++
package.json | 1 +
src/components/AppLayout/AppLayout.jsx | 3 +-
src/components/ArticleItem/ArticleItem.jsx | 24 ++++++++++--
.../ArticleItem/ArticleItem.styled.js | 5 +++
src/components/UserForm/UserForm.jsx | 14 ++++---
6 files changed, 74 insertions(+), 11 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index c995f59..6b96db8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -17,6 +17,7 @@
"modern-normalize": "^2.0.0",
"react": "^18.1.0",
"react-dom": "^18.1.0",
+ "react-hot-toast": "^2.4.1",
"react-icons": "^5.0.1",
"react-loader-spinner": "^6.1.6",
"react-modal": "^3.16.1",
@@ -7646,6 +7647,14 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/goober": {
+ "version": "2.1.14",
+ "resolved": "https://registry.npmjs.org/goober/-/goober-2.1.14.tgz",
+ "integrity": "sha512-4UpC0NdGyAFqLNPnhCT2iHpza2q+RAY3GV85a/mRPdzyPQMsj0KmMMuetdIkzWRbJ+Hgau1EZztq8ImmiMGhsg==",
+ "peerDependencies": {
+ "csstype": "^3.0.10"
+ }
+ },
"node_modules/graceful-fs": {
"version": "4.2.9",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz",
@@ -11874,6 +11883,21 @@
"resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-2.0.4.tgz",
"integrity": "sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw=="
},
+ "node_modules/react-hot-toast": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/react-hot-toast/-/react-hot-toast-2.4.1.tgz",
+ "integrity": "sha512-j8z+cQbWIM5LY37pR6uZR6D4LfseplqnuAO4co4u8917hBUvXlEqyP1ZzqVLcqoyUesZZv/ImreoCeHVDpE5pQ==",
+ "dependencies": {
+ "goober": "^2.1.10"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "react": ">=16",
+ "react-dom": ">=16"
+ }
+ },
"node_modules/react-icons": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.0.1.tgz",
@@ -20345,6 +20369,12 @@
"slash": "^3.0.0"
}
},
+ "goober": {
+ "version": "2.1.14",
+ "resolved": "https://registry.npmjs.org/goober/-/goober-2.1.14.tgz",
+ "integrity": "sha512-4UpC0NdGyAFqLNPnhCT2iHpza2q+RAY3GV85a/mRPdzyPQMsj0KmMMuetdIkzWRbJ+Hgau1EZztq8ImmiMGhsg==",
+ "requires": {}
+ },
"graceful-fs": {
"version": "4.2.9",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz",
@@ -23276,6 +23306,14 @@
"resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-2.0.4.tgz",
"integrity": "sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw=="
},
+ "react-hot-toast": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/react-hot-toast/-/react-hot-toast-2.4.1.tgz",
+ "integrity": "sha512-j8z+cQbWIM5LY37pR6uZR6D4LfseplqnuAO4co4u8917hBUvXlEqyP1ZzqVLcqoyUesZZv/ImreoCeHVDpE5pQ==",
+ "requires": {
+ "goober": "^2.1.10"
+ }
+ },
"react-icons": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.0.1.tgz",
diff --git a/package.json b/package.json
index 390dd92..e4aba08 100644
--- a/package.json
+++ b/package.json
@@ -13,6 +13,7 @@
"modern-normalize": "^2.0.0",
"react": "^18.1.0",
"react-dom": "^18.1.0",
+ "react-hot-toast": "^2.4.1",
"react-icons": "^5.0.1",
"react-loader-spinner": "^6.1.6",
"react-modal": "^3.16.1",
diff --git a/src/components/AppLayout/AppLayout.jsx b/src/components/AppLayout/AppLayout.jsx
index be8ebb2..0faf714 100644
--- a/src/components/AppLayout/AppLayout.jsx
+++ b/src/components/AppLayout/AppLayout.jsx
@@ -9,6 +9,7 @@ import {
HeaderList,
Nav,
} from './AppLayout.styled';
+import { Toaster } from 'react-hot-toast';
export const AppLayout = () => {
return (
@@ -31,7 +32,7 @@ export const AppLayout = () => {
{article.description || 'No description avalable'}
+