diff --git a/asset-manifest.json b/asset-manifest.json index bc0256e..5174a32 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,30 +1,36 @@ { "files": { "main.css": "/goit-react-hw-08-phonebook/static/css/main.7cda0caf.css", - "main.js": "/goit-react-hw-08-phonebook/static/js/main.b26ba3c9.js", - "static/js/905.233b722d.chunk.js": "/goit-react-hw-08-phonebook/static/js/905.233b722d.chunk.js", - "static/js/452.30f6de00.chunk.js": "/goit-react-hw-08-phonebook/static/js/452.30f6de00.chunk.js", - "static/js/652.ac6426cc.chunk.js": "/goit-react-hw-08-phonebook/static/js/652.ac6426cc.chunk.js", - "static/js/899.ce56b1d1.chunk.js": "/goit-react-hw-08-phonebook/static/js/899.ce56b1d1.chunk.js", - "static/js/26.e6971ce8.chunk.js": "/goit-react-hw-08-phonebook/static/js/26.e6971ce8.chunk.js", - "static/js/868.1bfd541e.chunk.js": "/goit-react-hw-08-phonebook/static/js/868.1bfd541e.chunk.js", - "static/js/181.d8cede20.chunk.js": "/goit-react-hw-08-phonebook/static/js/181.d8cede20.chunk.js", + "main.js": "/goit-react-hw-08-phonebook/static/js/main.41965c3a.js", + "static/js/373.47eead40.chunk.js": "/goit-react-hw-08-phonebook/static/js/373.47eead40.chunk.js", + "static/js/309.9ad141b6.chunk.js": "/goit-react-hw-08-phonebook/static/js/309.9ad141b6.chunk.js", + "static/js/314.e98fa4bb.chunk.js": "/goit-react-hw-08-phonebook/static/js/314.e98fa4bb.chunk.js", + "static/js/461.28d98f2e.chunk.js": "/goit-react-hw-08-phonebook/static/js/461.28d98f2e.chunk.js", + "static/js/276.76c67462.chunk.js": "/goit-react-hw-08-phonebook/static/js/276.76c67462.chunk.js", + "static/js/545.97fa5c0d.chunk.js": "/goit-react-hw-08-phonebook/static/js/545.97fa5c0d.chunk.js", + "static/js/795.8a31e02f.chunk.js": "/goit-react-hw-08-phonebook/static/js/795.8a31e02f.chunk.js", "static/js/270.ed8f73c4.chunk.js": "/goit-react-hw-08-phonebook/static/js/270.ed8f73c4.chunk.js", "static/js/568.535699c9.chunk.js": "/goit-react-hw-08-phonebook/static/js/568.535699c9.chunk.js", "static/js/378.8975af84.chunk.js": "/goit-react-hw-08-phonebook/static/js/378.8975af84.chunk.js", "static/js/651.bf1c4152.chunk.js": "/goit-react-hw-08-phonebook/static/js/651.bf1c4152.chunk.js", "static/js/14.2b5947a4.chunk.js": "/goit-react-hw-08-phonebook/static/js/14.2b5947a4.chunk.js", + "static/media/tasks.jpg": "/goit-react-hw-08-phonebook/static/media/tasks.21e2dc3d93441c04fce3.jpg", + "static/media/login.jpg": "/goit-react-hw-08-phonebook/static/media/login.5740cd741ba41ee3920b.jpg", + "static/media/register.jpg": "/goit-react-hw-08-phonebook/static/media/register.1bc32c8dda66de349989.jpg", + "static/media/contacts.jpg": "/goit-react-hw-08-phonebook/static/media/contacts.10ca8ca6c6494bd8c807.jpg", + "static/media/contact_edit.jpg": "/goit-react-hw-08-phonebook/static/media/contact_edit.d8226386696e11c1f0c8.jpg", "static/media/home.jpg": "/goit-react-hw-08-phonebook/static/media/home.af12a45630dd0e647adb.jpg", + "static/media/not_found.jpg": "/goit-react-hw-08-phonebook/static/media/not_found.63fa34bd2872f402dc85.jpg", "index.html": "/goit-react-hw-08-phonebook/index.html", "main.7cda0caf.css.map": "/goit-react-hw-08-phonebook/static/css/main.7cda0caf.css.map", - "main.b26ba3c9.js.map": "/goit-react-hw-08-phonebook/static/js/main.b26ba3c9.js.map", - "905.233b722d.chunk.js.map": "/goit-react-hw-08-phonebook/static/js/905.233b722d.chunk.js.map", - "452.30f6de00.chunk.js.map": "/goit-react-hw-08-phonebook/static/js/452.30f6de00.chunk.js.map", - "652.ac6426cc.chunk.js.map": "/goit-react-hw-08-phonebook/static/js/652.ac6426cc.chunk.js.map", - "899.ce56b1d1.chunk.js.map": "/goit-react-hw-08-phonebook/static/js/899.ce56b1d1.chunk.js.map", - "26.e6971ce8.chunk.js.map": "/goit-react-hw-08-phonebook/static/js/26.e6971ce8.chunk.js.map", - "868.1bfd541e.chunk.js.map": "/goit-react-hw-08-phonebook/static/js/868.1bfd541e.chunk.js.map", - "181.d8cede20.chunk.js.map": "/goit-react-hw-08-phonebook/static/js/181.d8cede20.chunk.js.map", + "main.41965c3a.js.map": "/goit-react-hw-08-phonebook/static/js/main.41965c3a.js.map", + "373.47eead40.chunk.js.map": "/goit-react-hw-08-phonebook/static/js/373.47eead40.chunk.js.map", + "309.9ad141b6.chunk.js.map": "/goit-react-hw-08-phonebook/static/js/309.9ad141b6.chunk.js.map", + "314.e98fa4bb.chunk.js.map": "/goit-react-hw-08-phonebook/static/js/314.e98fa4bb.chunk.js.map", + "461.28d98f2e.chunk.js.map": "/goit-react-hw-08-phonebook/static/js/461.28d98f2e.chunk.js.map", + "276.76c67462.chunk.js.map": "/goit-react-hw-08-phonebook/static/js/276.76c67462.chunk.js.map", + "545.97fa5c0d.chunk.js.map": "/goit-react-hw-08-phonebook/static/js/545.97fa5c0d.chunk.js.map", + "795.8a31e02f.chunk.js.map": "/goit-react-hw-08-phonebook/static/js/795.8a31e02f.chunk.js.map", "270.ed8f73c4.chunk.js.map": "/goit-react-hw-08-phonebook/static/js/270.ed8f73c4.chunk.js.map", "568.535699c9.chunk.js.map": "/goit-react-hw-08-phonebook/static/js/568.535699c9.chunk.js.map", "378.8975af84.chunk.js.map": "/goit-react-hw-08-phonebook/static/js/378.8975af84.chunk.js.map", @@ -33,6 +39,6 @@ }, "entrypoints": [ "static/css/main.7cda0caf.css", - "static/js/main.b26ba3c9.js" + "static/js/main.41965c3a.js" ] } \ No newline at end of file diff --git a/img/home.jpg b/img/home.jpg deleted file mode 100644 index c74ef9e..0000000 Binary files a/img/home.jpg and /dev/null differ diff --git a/index.html b/index.html index 41cbf7e..047a48b 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -React App
\ No newline at end of file +React App
\ No newline at end of file diff --git a/icons8-office-phone-32.png b/office-phone.ico similarity index 100% rename from icons8-office-phone-32.png rename to office-phone.ico diff --git a/static/js/181.d8cede20.chunk.js b/static/js/181.d8cede20.chunk.js deleted file mode 100644 index 46695bb..0000000 --- a/static/js/181.d8cede20.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";(self.webpackChunkreact_homework_template=self.webpackChunkreact_homework_template||[]).push([[181],{9181:function(e,n,t){t.r(n),t.d(n,{default:function(){return s}});var r,o=t(8346),i=t(4270),u=t(168),c=(0,t(5867).vJ)(r||(r=(0,u.Z)(["\nbody{\n background-image: url('../../public/img/not_found.jpg');\n}\n"]))),l=t(184);function s(){return(0,l.jsxs)("main",{children:[(0,l.jsx)(i.q,{title:"Not Found..."}),(0,l.jsxs)(o.x,{children:[(0,l.jsx)("h1",{style:{fontSize:120},children:"404"}),(0,l.jsx)("b",{style:{fontSize:28},children:"Sorry, we couldn't find that page..."})]}),(0,l.jsx)(c,{})]})}}}]); -//# sourceMappingURL=181.d8cede20.chunk.js.map \ No newline at end of file diff --git a/static/js/181.d8cede20.chunk.js.map b/static/js/181.d8cede20.chunk.js.map deleted file mode 100644 index c8775b6..0000000 --- a/static/js/181.d8cede20.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/js/181.d8cede20.chunk.js","mappings":"uNAEaA,GAAsBC,E,QAAAA,IAAiBC,IAAAA,GAAAC,EAAAA,EAAAA,GAAA,kF,SCErC,SAASC,IACtB,OACEC,EAAAA,EAAAA,MAAA,QAAAC,SAAA,EACEC,EAAAA,EAAAA,KAACC,EAAAA,EAAM,CAACC,MAAM,kBACdJ,EAAAA,EAAAA,MAACK,EAAAA,EAAG,CAAAJ,SAAA,EACFC,EAAAA,EAAAA,KAAA,MAAII,MAAO,CAAEC,SAAU,KAAMN,SAAC,SAC9BC,EAAAA,EAAAA,KAAA,KAAGI,MAAO,CAAEC,SAAU,IAAKN,SAAC,6CAE9BC,EAAAA,EAAAA,KAACP,EAAmB,MAG1B,C","sources":["pages/NotFoundPage.styled.js","pages/NotFoundPage.jsx"],"sourcesContent":["import { createGlobalStyle } from 'styled-components';\n\nexport const NotFoundGlobalStyle = createGlobalStyle`\nbody{\n background-image: url('../../public/img/not_found.jpg');\n}\n`;\n","import { Box } from 'components/GlobalStyle';\nimport { Helmet } from 'react-helmet';\nimport { NotFoundGlobalStyle } from './NotFoundPage.styled';\n\nexport default function NotFound() {\n return (\n
\n \n \n

404

\n Sorry, we couldn't find that page...\n
\n \n
\n );\n}\n"],"names":["NotFoundGlobalStyle","createGlobalStyle","_templateObject","_taggedTemplateLiteral","NotFound","_jsxs","children","_jsx","Helmet","title","Box","style","fontSize"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/26.e6971ce8.chunk.js b/static/js/26.e6971ce8.chunk.js deleted file mode 100644 index 0399676..0000000 --- a/static/js/26.e6971ce8.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";(self.webpackChunkreact_homework_template=self.webpackChunkreact_homework_template||[]).push([[26],{3026:function(n,t,r){r.r(t),r.d(t,{default:function(){return S}});var e,o,a,i,s=r(4270),c=r(9434),d=r(9778),u=r(168),p=r(5867),l=p.zo.div(e||(e=(0,u.Z)(["\n display: flex;\n align-items: center;\n gap: 8px;\n border: 2px outset darkgrey;\n padding: 2px;\n border-radius: 18px;\n transition: transform 800ms cubic-bezier(0.4, 0, 0.2, 1);\n\n &:hover {\n transform: scale(1.08);\n }\n"]))),x=p.zo.b(o||(o=(0,u.Z)(["\n text-align: initial;\n margin-top: 0;\n margin-bottom: 0;\n"]))),b=p.zo.button(a||(a=(0,u.Z)(["\n font-size: 13px;\n font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande',\n 'Lucida Sans', Arial, sans-serif;\n margin-left: auto;\n padding: 2px 8px;\n color: white;\n background-color: black;\n border-radius: 13px;\n transition: transform 800ms cubic-bezier(0.4, 0, 0.2, 1);\n\n &:hover {\n background-color: transparent;\n color: buttonborder;\n transform: scale(1.1);\n }\n"]))),g=p.zo.input(i||(i=(0,u.Z)(["\n margin-left: 8px;\n width: 18px;\n height: 18px;\n cursor: pointer;\n"]))),m=r(184);function f(n){var t=n.id,r=n.text,e=n.completed,o=(0,c.I0)();return(0,m.jsxs)(l,{children:[(0,m.jsx)(g,{type:"checkbox",checked:e,onChange:function(){return o((0,d.KE)(t))}}),(0,m.jsx)(x,{children:r}),(0,m.jsx)(b,{type:"button",onClick:function(){return o((0,d._5)(t))},children:"Delete"})]})}var h,k,v=function(n){return n.tasks},j=p.zo.ul(h||(h=(0,u.Z)(["\n padding: 0;\n margin: 0;\n list-style: none;\n display: grid;\n grid-template-columns: 1fr;\n grid-gap: 12px;\n"])));function w(){var n=(0,c.v9)(v).tasks;return(0,m.jsx)(j,{children:n.map((function(n){var t=n.id,r=n.text,e=n.completed;return(0,m.jsx)("li",{children:(0,m.jsx)(f,{id:t,text:r,completed:e})},t)}))})}var y,z=p.zo.form(k||(k=(0,u.Z)(["\n display: flex;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 100%;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px;\n margin-bottom: 28px;\n\n button {\n font-weight: bold;\n width: 120px;\n height: 48px;\n padding: 4px 8px;\n border-radius: 13px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n input {\n /* margin-top: 8px; */\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n /* text-align: center; */\n /* background-color: rgba(255, 255, 255, 0); */\n }\n"])));function Z(){var n=(0,c.I0)();return(0,m.jsxs)(z,{onSubmit:function(t){t.preventDefault();var r=t.currentTarget,e=r.elements.text.value;if(""!==e)return n((0,d.gI)(e)),void r.reset();alert("Task cannot be empty. Enter some text!")},children:[(0,m.jsx)("input",{name:"text"}),(0,m.jsx)("button",{type:"submit",children:"Add task"})]})}var _=(0,p.vJ)(y||(y=(0,u.Z)(["\nbody{\n background-image: url('https://kartinki.pics/uploads/posts/2021-07/1625655357_41-kartinkin-com-p-biblioteka-art-art-krasivo-46.jpg');\n}\n"]))),C=r(8346);function S(){return(0,m.jsxs)(C.x,{children:[(0,m.jsx)(s.q,{title:"Your tasks"}),(0,m.jsx)(Z,{}),(0,m.jsx)(w,{}),(0,m.jsx)(_,{})]})}}}]); -//# sourceMappingURL=26.e6971ce8.chunk.js.map \ No newline at end of file diff --git a/static/js/26.e6971ce8.chunk.js.map b/static/js/26.e6971ce8.chunk.js.map deleted file mode 100644 index 6730e48..0000000 --- a/static/js/26.e6971ce8.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/js/26.e6971ce8.chunk.js","mappings":"gPAEaA,EAAYC,EAAAA,GAAAA,IAAUC,IAAAA,GAAAC,EAAAA,EAAAA,GAAA,wPActBC,EAAOH,EAAAA,GAAAA,EAAQI,IAAAA,GAAAF,EAAAA,EAAAA,GAAA,yEAMfG,EAAYL,EAAAA,GAAAA,OAAaM,IAAAA,GAAAJ,EAAAA,EAAAA,GAAA,waAkBzBK,EAAWP,EAAAA,GAAAA,MAAYQ,IAAAA,GAAAN,EAAAA,EAAAA,GAAA,oF,SCpCrB,SAASO,EAAQC,GAA2B,IAAxBC,EAAED,EAAFC,GAAIC,EAAIF,EAAJE,KAAMC,EAASH,EAATG,UACrCC,GAAWC,EAAAA,EAAAA,MAIjB,OACEC,EAAAA,EAAAA,MAACjB,EAAS,CAAAkB,SAAA,EACRC,EAAAA,EAAAA,KAACX,EAAQ,CAACY,KAAK,WAAWC,QAASP,EAAWQ,SAJ7B,WAAH,OAASP,GAASQ,EAAAA,EAAAA,IAAgBX,GAAK,KAKrDO,EAAAA,EAAAA,KAACf,EAAI,CAAAc,SAAEL,KACPM,EAAAA,EAAAA,KAACb,EAAS,CAACc,KAAK,SAASI,QAPR,WAAH,OAAST,GAASU,EAAAA,EAAAA,IAAWb,GAAK,EAODM,SAAC,aAKtD,CClBO,I,IAAMQ,EAAiB,SAAAC,GAAK,OAAIA,EAAMC,KAAM,ECEtCC,E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B,C","sources":["components/TaskItem/TaskItem.styled.js","components/TaskItem/TaskItem.jsx","redux/tasks/selectors.js","components/TaskList/TaskList.styled.js","components/TaskList/TaskList.jsx","hooks/useTasks.js","components/TaskEditor/TaskEditor.styled.js","components/TaskEditor/TaskEditor.jsx","pages/Tasks.styled.js","pages/Tasks.jsx"],"sourcesContent":["import { styled } from 'styled-components';\n\nexport const TaskThumb = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n border: 2px outset darkgrey;\n padding: 2px;\n border-radius: 18px;\n transition: transform 800ms cubic-bezier(0.4, 0, 0.2, 1);\n\n &:hover {\n transform: scale(1.08);\n }\n`;\n\nexport const Text = styled.b`\n text-align: initial;\n margin-top: 0;\n margin-bottom: 0;\n`;\n\nexport const DelButton = styled.button`\n font-size: 13px;\n font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande',\n 'Lucida Sans', Arial, sans-serif;\n margin-left: auto;\n padding: 2px 8px;\n color: white;\n background-color: black;\n border-radius: 13px;\n transition: transform 800ms cubic-bezier(0.4, 0, 0.2, 1);\n\n &:hover {\n background-color: transparent;\n color: buttonborder;\n transform: scale(1.1);\n }\n`;\n\nexport const Checkbox = styled.input`\n margin-left: 8px;\n width: 18px;\n height: 18px;\n cursor: pointer;\n`;\n","import { useDispatch } from 'react-redux';\nimport { deleteTask, toggleCompleted } from 'redux/tasks/tasksSlice';\nimport { Checkbox, DelButton, TaskThumb, Text } from './TaskItem.styled';\n\nexport default function TaskItem({ id, text, completed }) {\n const dispatch = useDispatch();\n const handleDelete = () => dispatch(deleteTask(id));\n const handleToggle = () => dispatch(toggleCompleted(id));\n\n return (\n \n \n {text}\n \n Delete\n \n \n );\n}\n","export const selectAllTasks = state => state.tasks;\n","import { styled } from 'styled-components';\n\nexport const List = styled.ul`\n padding: 0;\n margin: 0;\n list-style: none;\n display: grid;\n grid-template-columns: 1fr;\n grid-gap: 12px;\n`;\n","import TaskItem from 'components/TaskItem/TaskItem';\nimport { useTasks } from 'hooks/useTasks';\nimport { List } from './TaskList.styled';\n\nexport default function TaskList() {\n const { tasks } = useTasks();\n\n return (\n \n {tasks.map(({ id, text, completed }) => (\n
  • \n \n
  • \n ))}\n
    \n );\n}\n","import { useSelector } from 'react-redux';\nimport { selectAllTasks } from 'redux/tasks/selectors';\n\nexport const useTasks = () => {\n const tasks = useSelector(selectAllTasks);\n\n return tasks;\n};\n","import { styled } from 'styled-components';\n\nexport const EditForm = styled.form`\n display: flex;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 100%;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px;\n margin-bottom: 28px;\n\n button {\n font-weight: bold;\n width: 120px;\n height: 48px;\n padding: 4px 8px;\n border-radius: 13px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n input {\n /* margin-top: 8px; */\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n /* text-align: center; */\n /* background-color: rgba(255, 255, 255, 0); */\n }\n`;\n","import { useDispatch } from 'react-redux';\nimport { addTask } from 'redux/tasks/tasksSlice';\nimport { EditForm } from './TaskEditor.styled';\n\nexport default function TaskEditor() {\n const dispatch = useDispatch();\n\n const handleSubmit = e => {\n e.preventDefault();\n const form = e.currentTarget;\n const text = form.elements.text.value;\n if (text !== '') {\n dispatch(addTask(text));\n form.reset();\n return;\n }\n alert('Task cannot be empty. Enter some text!');\n };\n\n return (\n \n \n \n \n );\n}\n","import { createGlobalStyle } from 'styled-components';\n\nexport const TasksGlobalStyle = createGlobalStyle`\nbody{\n background-image: url('https://kartinki.pics/uploads/posts/2021-07/1625655357_41-kartinkin-com-p-biblioteka-art-art-krasivo-46.jpg');\n}\n`;\n","// import { useEffect } from 'react';\n// import { useDispatch } from 'react-redux';\nimport { Helmet } from 'react-helmet';\nimport TaskList from 'components/TaskList/TaskList';\nimport TaskEditor from 'components/TaskEditor/TaskEditor';\nimport { TasksGlobalStyle } from './Tasks.styled';\nimport { Box } from 'components/GlobalStyle';\n\nexport default function Tasks() {\n return (\n \n \n\n \n \n \n \n );\n}\n"],"names":["TaskThumb","styled","_templateObject","_taggedTemplateLiteral","Text","_templateObject2","DelButton","_templateObject3","Checkbox","_templateObject4","TaskItem","_ref","id","text","completed","dispatch","useDispatch","_jsxs","children","_jsx","type","checked","onChange","toggleCompleted","onClick","deleteTask","selectAllTasks","state","tasks","List","TaskList","useSelector","map","EditForm","TaskEditor","onSubmit","e","preventDefault","form","currentTarget","elements","value","addTask","reset","alert","name","TasksGlobalStyle","createGlobalStyle","Tasks","Box","Helmet","title"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/276.76c67462.chunk.js b/static/js/276.76c67462.chunk.js new file mode 100644 index 0000000..7bc4081 --- /dev/null +++ b/static/js/276.76c67462.chunk.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkreact_homework_template=self.webpackChunkreact_homework_template||[]).push([[276],{2208:function(n,t,r){r.r(t),r.d(t,{default:function(){return I}});var e,o,a,i,s=r(4270),c=r(9434),d=r(9778),u=r(168),p=r(5867),l=p.zo.div(e||(e=(0,u.Z)(["\n display: flex;\n align-items: center;\n gap: 8px;\n border: 2px outset darkgrey;\n padding: 2px;\n border-radius: 18px;\n transition: transform 800ms cubic-bezier(0.4, 0, 0.2, 1);\n\n &:hover {\n transform: scale(1.08);\n }\n"]))),x=p.zo.b(o||(o=(0,u.Z)(["\n text-align: initial;\n margin-top: 0;\n margin-bottom: 0;\n"]))),b=p.zo.button(a||(a=(0,u.Z)(["\n font-size: 13px;\n font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande',\n 'Lucida Sans', Arial, sans-serif;\n margin-left: auto;\n padding: 2px 8px;\n color: white;\n background-color: black;\n border-radius: 13px;\n transition: transform 800ms cubic-bezier(0.4, 0, 0.2, 1);\n\n &:hover {\n background-color: transparent;\n color: buttonborder;\n transform: scale(1.1);\n }\n"]))),g=p.zo.input(i||(i=(0,u.Z)(["\n margin-left: 8px;\n width: 18px;\n height: 18px;\n cursor: pointer;\n"]))),m=r(184);function f(n){var t=n.id,r=n.text,e=n.completed,o=(0,c.I0)();return(0,m.jsxs)(l,{children:[(0,m.jsx)(g,{type:"checkbox",checked:e,onChange:function(){return o((0,d.KE)(t))}}),(0,m.jsx)(x,{children:r}),(0,m.jsx)(b,{type:"button",onClick:function(){return o((0,d._5)(t))},children:"Delete"})]})}var k,h,v=function(n){return n.tasks},j=p.zo.ul(k||(k=(0,u.Z)(["\n padding: 0;\n margin: 0;\n list-style: none;\n display: grid;\n grid-template-columns: 1fr;\n grid-gap: 12px;\n"])));function w(){var n=(0,c.v9)(v).tasks;return(0,m.jsx)(j,{children:n.map((function(n){var t=n.id,r=n.text,e=n.completed;return(0,m.jsx)("li",{children:(0,m.jsx)(f,{id:t,text:r,completed:e})},t)}))})}var y=p.zo.form(h||(h=(0,u.Z)(["\n display: flex;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 100%;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px;\n margin-bottom: 28px;\n\n button {\n font-weight: bold;\n width: 120px;\n height: 48px;\n padding: 4px 8px;\n border-radius: 13px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n input {\n /* margin-top: 8px; */\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n /* text-align: center; */\n /* background-color: rgba(255, 255, 255, 0); */\n }\n"])));function z(){var n=(0,c.I0)();return(0,m.jsxs)(y,{onSubmit:function(t){t.preventDefault();var r=t.currentTarget,e=r.elements.text.value;if(""!==e)return n((0,d.gI)(e)),void r.reset();alert("Task cannot be empty. Enter some text!")},children:[(0,m.jsx)("input",{name:"text"}),(0,m.jsx)("button",{type:"submit",children:"Add task"})]})}var Z,_=r.p+"static/media/tasks.21e2dc3d93441c04fce3.jpg",C=(0,p.vJ)(Z||(Z=(0,u.Z)(["\nbody{\n /* background-image: url('https://kartinki.pics/uploads/posts/2021-07/1625655357_41-kartinkin-com-p-biblioteka-art-art-krasivo-46.jpg'); */\n\n background-image: url(",");\n}\n"])),_),S=r(8346);function I(){return(0,m.jsxs)(S.x,{children:[(0,m.jsx)(s.q,{title:"Your tasks"}),(0,m.jsx)(z,{}),(0,m.jsx)(w,{}),(0,m.jsx)(C,{})]})}}}]); +//# sourceMappingURL=276.76c67462.chunk.js.map \ No newline at end of file diff --git a/static/js/276.76c67462.chunk.js.map b/static/js/276.76c67462.chunk.js.map new file mode 100644 index 0000000..dca93d0 --- /dev/null +++ b/static/js/276.76c67462.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"static/js/276.76c67462.chunk.js","mappings":"iPAEaA,EAAYC,EAAAA,GAAAA,IAAUC,IAAAA,GAAAC,EAAAA,EAAAA,GAAA,wPActBC,EAAOH,EAAAA,GAAAA,EAAQI,IAAAA,GAAAF,EAAAA,EAAAA,GAAA,yEAMfG,EAAYL,EAAAA,GAAAA,OAAaM,IAAAA,GAAAJ,EAAAA,EAAAA,GAAA,waAkBzBK,EAAWP,EAAAA,GAAAA,MAAYQ,IAAAA,GAAAN,EAAAA,EAAAA,GAAA,oF,SCpCrB,SAASO,EAAQC,GAA2B,IAAxBC,EAAED,EAAFC,GAAIC,EAAIF,EAAJE,KAAMC,EAASH,EAATG,UACrCC,GAAWC,EAAAA,EAAAA,MAIjB,OACEC,EAAAA,EAAAA,MAACjB,EAAS,CAAAkB,SAAA,EACRC,EAAAA,EAAAA,KAACX,EAAQ,CAACY,KAAK,WAAWC,QAASP,EAAWQ,SAJ7B,WAAH,OAASP,GAASQ,EAAAA,EAAAA,IAAgBX,GAAK,KAKrDO,EAAAA,EAAAA,KAACf,EAAI,CAAAc,SAAEL,KACPM,EAAAA,EAAAA,KAACb,EAAS,CAACc,KAAK,SAASI,QAPR,WAAH,OAAST,GAASU,EAAAA,EAAAA,IAA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A,EAAAA,KAACe,EAAU,KACXf,EAAAA,EAAAA,KAACW,EAAQ,KACTX,EAAAA,EAAAA,KAAC2B,EAAgB,MAGvB,C","sources":["components/TaskItem/TaskItem.styled.js","components/TaskItem/TaskItem.jsx","redux/tasks/selectors.js","components/TaskList/TaskList.styled.js","components/TaskList/TaskList.jsx","hooks/useTasks.js","components/TaskEditor/TaskEditor.styled.js","components/TaskEditor/TaskEditor.jsx","pages/Tasks.styled.js","pages/Tasks.jsx"],"sourcesContent":["import { styled } from 'styled-components';\n\nexport const TaskThumb = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n border: 2px outset darkgrey;\n padding: 2px;\n border-radius: 18px;\n transition: transform 800ms cubic-bezier(0.4, 0, 0.2, 1);\n\n &:hover {\n transform: scale(1.08);\n }\n`;\n\nexport const Text = styled.b`\n text-align: initial;\n margin-top: 0;\n margin-bottom: 0;\n`;\n\nexport const DelButton = styled.button`\n font-size: 13px;\n font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande',\n 'Lucida Sans', Arial, sans-serif;\n margin-left: auto;\n padding: 2px 8px;\n color: white;\n background-color: black;\n border-radius: 13px;\n transition: transform 800ms cubic-bezier(0.4, 0, 0.2, 1);\n\n &:hover {\n background-color: transparent;\n color: buttonborder;\n transform: scale(1.1);\n }\n`;\n\nexport const Checkbox = styled.input`\n margin-left: 8px;\n width: 18px;\n height: 18px;\n cursor: pointer;\n`;\n","import { useDispatch } from 'react-redux';\nimport { deleteTask, toggleCompleted } from 'redux/tasks/tasksSlice';\nimport { Checkbox, DelButton, TaskThumb, Text } from './TaskItem.styled';\n\nexport default function TaskItem({ id, text, completed }) {\n const dispatch = useDispatch();\n const handleDelete = () => dispatch(deleteTask(id));\n const handleToggle = () => dispatch(toggleCompleted(id));\n\n return (\n \n \n {text}\n \n Delete\n \n \n );\n}\n","export const selectAllTasks = state => state.tasks;\n","import { styled } from 'styled-components';\n\nexport const List = styled.ul`\n padding: 0;\n margin: 0;\n list-style: none;\n display: grid;\n grid-template-columns: 1fr;\n grid-gap: 12px;\n`;\n","import TaskItem from 'components/TaskItem/TaskItem';\nimport { useTasks } from 'hooks/useTasks';\nimport { List } from './TaskList.styled';\n\nexport default function TaskList() {\n const { tasks } = useTasks();\n\n return (\n \n {tasks.map(({ id, text, completed }) => (\n
  • \n \n
  • \n ))}\n
    \n );\n}\n","import { useSelector } from 'react-redux';\nimport { selectAllTasks } from 'redux/tasks/selectors';\n\nexport const useTasks = () => {\n const tasks = useSelector(selectAllTasks);\n\n return tasks;\n};\n","import { styled } from 'styled-components';\n\nexport const EditForm = styled.form`\n display: flex;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 100%;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px;\n margin-bottom: 28px;\n\n button {\n font-weight: bold;\n width: 120px;\n height: 48px;\n padding: 4px 8px;\n border-radius: 13px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n input {\n /* margin-top: 8px; */\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n /* text-align: center; */\n /* background-color: rgba(255, 255, 255, 0); */\n }\n`;\n","import { useDispatch } from 'react-redux';\nimport { addTask } from 'redux/tasks/tasksSlice';\nimport { EditForm } from './TaskEditor.styled';\n\nexport default function TaskEditor() {\n const dispatch = useDispatch();\n\n const handleSubmit = e => {\n e.preventDefault();\n const form = e.currentTarget;\n const text = form.elements.text.value;\n if (text !== '') {\n dispatch(addTask(text));\n form.reset();\n return;\n }\n alert('Task cannot be empty. Enter some text!');\n };\n\n return (\n \n \n \n \n );\n}\n","import { createGlobalStyle } from 'styled-components';\nimport tasksImage from '../images/tasks.jpg';\n\nexport const TasksGlobalStyle = createGlobalStyle`\nbody{\n /* background-image: url('https://kartinki.pics/uploads/posts/2021-07/1625655357_41-kartinkin-com-p-biblioteka-art-art-krasivo-46.jpg'); */\n\n background-image: url(${tasksImage});\n}\n`;\n","// import { useEffect } from 'react';\n// import { useDispatch } from 'react-redux';\nimport { Helmet } from 'react-helmet';\nimport TaskList from 'components/TaskList/TaskList';\nimport TaskEditor from 'components/TaskEditor/TaskEditor';\nimport { TasksGlobalStyle } from './Tasks.styled';\nimport { Box } from 'components/GlobalStyle';\n\nexport default function Tasks() {\n return (\n \n \n\n \n \n \n \n );\n}\n"],"names":["TaskThumb","styled","_templateObject","_taggedTemplateLiteral","Text","_templateObject2","DelButton","_templateObject3","Checkbox","_templateObject4","TaskItem","_ref","id","text","completed","dispatch","useDispatch","_jsxs","children","_jsx","type","checked","onChange","toggleCompleted","onClick","deleteTask","selectAllTasks","state","tasks","List","TaskList","useSelector","map","EditForm","TaskEditor","onSubmit","e","preventDefault","form","currentTarget","elements","value","addTask","reset","alert","name","TasksGlobalStyle","createGlobalStyle","tasksImage","Tasks","Box","Helmet","title"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/309.9ad141b6.chunk.js b/static/js/309.9ad141b6.chunk.js new file mode 100644 index 0000000..eb8e105 --- /dev/null +++ b/static/js/309.9ad141b6.chunk.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkreact_homework_template=self.webpackChunkreact_homework_template||[]).push([[309],{2799:function(n,e,r){r.r(e),r.d(e,{default:function(){return w}});var t,a=r(4270),o=r(1413),i=r(5705),s=r(6727),l=r(9434),d=r(5822),c=r(168),p=r(5867),u=(0,p.zo)(i.l0)(t||(t=(0,c.Z)(["\n display: flex;\n flex-direction: column;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 480px;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px 28px;\n margin-bottom: 28px;\n\n button {\n font-weight: bold;\n margin-bottom: 28px;\n padding: 4px 8px;\n border-radius: 22px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n label {\n font-style: oblique;\n font-weight: 500;\n margin-bottom: 13px;\n\n b {\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n color: darkred;\n text-transform: lowercase;\n }\n\n input {\n margin-top: 8px;\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n text-align: center;\n /* background-color: rgba(255, 255, 255, 0); */\n }\n }\n"]))),m=r(1087),b=r(184),x=s.Ry({name:s.Z_().required("Must be filled"),email:s.Z_().email().required("Must be filled"),password:s.Z_().min(8).required("Must be filled")});function g(){var n=(0,l.I0)();return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h2",{children:"Registration Form"}),(0,b.jsxs)("h5",{children:["Have an account already? ",(0,b.jsx)(m.rU,{to:"/login",children:"Sign Up"})," please!"]}),(0,b.jsx)(i.J9,{initialValues:{name:"",email:"",password:""},validationSchema:x,onSubmit:function(e,r){n((0,d.z2)((0,o.Z)({},e)))},children:(0,b.jsxs)(u,{autoComplete:"off",children:[(0,b.jsxs)("label",{children:["Username",(0,b.jsx)(i.gN,{type:"text",name:"name",placeholder:"Enter your name"}),(0,b.jsx)(i.Bc,{name:"name",component:"b"})]}),(0,b.jsxs)("label",{children:["Email",(0,b.jsx)(i.gN,{type:"email",name:"email",placeholder:"Enter your email"}),(0,b.jsx)(i.Bc,{name:"email",component:"b"})]}),(0,b.jsxs)("label",{children:["Password",(0,b.jsx)(i.gN,{type:"password",name:"password",placeholder:"Enter your password"}),(0,b.jsx)(i.Bc,{name:"password",component:"b"})]}),(0,b.jsx)("button",{type:"submit",children:"Register"})]})})]})}var h,f=r.p+"static/media/register.1bc32c8dda66de349989.jpg",j=(0,p.vJ)(h||(h=(0,c.Z)(["\nbody{\n /* background-image: url('https://kartinki.pics/uploads/posts/2021-07/thumbs/1625655412_56-kartinkin-com-p-biblioteka-art-art-krasivo-61.jpg'); */\n\n background-image: url(",");\n}\n"])),f),k=r(8346);function w(){return(0,b.jsxs)(k.x,{children:[(0,b.jsx)(a.q,{title:"Registration"}),(0,b.jsx)(g,{}),(0,b.jsx)(j,{})]})}}}]); +//# sourceMappingURL=309.9ad141b6.chunk.js.map \ No newline at end of file diff --git a/static/js/309.9ad141b6.chunk.js.map b/static/js/309.9ad141b6.chunk.js.map new file mode 100644 index 0000000..8071243 --- /dev/null +++ b/static/js/309.9ad141b6.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"static/js/309.9ad141b6.chunk.js","mappings":"yQAGaA,GAAYC,EAAAA,EAAAA,IAAOC,EAAAA,GAAPD,CAAYE,IAAAA,GAAAC,EAAAA,EAAAA,GAAA,g/B,mBCK/BC,EAAaC,EAAAA,GAAW,CAC5BC,KAAMD,EAAAA,KAAaE,SAAS,kBAC5BC,MAAOH,EAAAA,KAAaG,QAAQD,SAAS,kBACrCE,SAAUJ,EAAAA,KAAaK,IAAI,GAAGH,SAAS,oBAG1B,SAASI,IACtB,IAAMC,GAAWC,EAAAA,EAAAA,MAiBjB,OACEC,EAAAA,EAAAA,MAAAC,EAAAA,SAAA,CAAAC,SAAA,EACEC,EAAAA,EAAAA,KAAA,MAAAD,SAAI,uBACJF,EAAAA,EAAAA,MAAA,MAAAE,SAAA,CAAI,6BACuBC,EAAAA,EAAAA,KAACC,EAAAA,GAAI,CAACC,GAAG,SAAQH,SAAC,YAAc,eAE3DC,EAAAA,EAAAA,KAACG,EAAAA,GAAM,CACLC,cATgB,CAAEf,KAAM,GAAIE,MAAO,GAAIC,SAAU,IAUjDa,iBAAkBlB,EAClBmB,SAAU,SAACC,EAAQC,GACjBb,GAASc,EAAAA,EAAAA,KAAQC,EAAAA,EAAAA,GAAC,CAAC,EAAIH,IAEzB,EAAER,UAEFF,EAAAA,EAAAA,MAACf,EAAS,CAAC6B,aAAa,MAAKZ,SAAA,EAC3BF,EAAAA,EAAAA,MAAA,SAAAE,SAAA,CAAO,YAELC,EAAAA,EAAAA,KAACY,EAAAA,GAAK,CAACC,KAAK,OAAOxB,KAAK,OAAOyB,YAAY,qBAC3Cd,EAAAA,EAAAA,KAACe,EAAAA,GAAY,CAAC1B,KAAK,OAAO2B,UAAU,UAEtCnB,EAAAA,EAAAA,MAAA,SAAAE,SAAA,CAAO,SAELC,EAAAA,EAAAA,KAACY,EAAAA,GAAK,CAACC,KAAK,QAAQxB,KAAK,QAAQyB,YAAY,sBAC7Cd,EAAAA,EAAAA,KAACe,EAAAA,GAAY,CAAC1B,KAAK,QAAQ2B,UAAU,UAEvCnB,EAAAA,EAAAA,MAAA,SAAAE,SAAA,CAAO,YAELC,EAAAA,EAAAA,KAACY,EAAAA,GAAK,CACJC,KAAK,WACLxB,KAAK,WACLyB,YAAY,yBAEdd,EAAAA,EAAAA,KAACe,EAAAA,GAAY,CAAC1B,KAAK,WAAW2B,UAAU,UAE1ChB,EAAAA,EAAAA,KAAA,UAAQa,KAAK,SAAQd,SAAC,oBAKhC,C,6DCpEakB,GAAgBC,EAAAA,EAAAA,IAAiBjC,IAAAA,GAAAC,EAAAA,EAAAA,GAAA,8MAIlBiC,G,UCDb,SAASC,IACtB,OACEvB,EAAAA,EAAAA,MAACwB,EAAAA,EAAG,CAAAtB,SAAA,EACFC,EAAAA,EAAAA,KAACsB,EAAAA,EAAM,CAACC,MAAM,kBAEdvB,EAAAA,EAAAA,KAACN,EAAY,KACbM,EAAAA,EAAAA,KAACiB,EAAa,MAGpB,C","sources":["components/RegisterForm/RegisterForm.styled.js","components/RegisterForm/RegisterForm.jsx","pages/Register.styled.js","pages/Register.jsx"],"sourcesContent":["import { Form } from 'formik';\nimport { styled } from 'styled-components';\n\nexport const FormThumb = styled(Form)`\n display: flex;\n flex-direction: column;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 480px;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px 28px;\n margin-bottom: 28px;\n\n button {\n font-weight: bold;\n margin-bottom: 28px;\n padding: 4px 8px;\n border-radius: 22px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n label {\n font-style: oblique;\n font-weight: 500;\n margin-bottom: 13px;\n\n b {\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n color: darkred;\n text-transform: lowercase;\n }\n\n input {\n margin-top: 8px;\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n text-align: center;\n /* background-color: rgba(255, 255, 255, 0); */\n }\n }\n`;\n","import { ErrorMessage, Field, Formik } from 'formik';\nimport * as Yup from 'yup';\nimport { useDispatch } from 'react-redux';\nimport { register } from 'redux/auth/authOperations';\nimport { FormThumb } from './RegisterForm.styled';\nimport { Link } from 'react-router-dom';\n// import LoadingSpinnerComponent from 'react-spinners-components';\n\nconst formSchema = Yup.object({\n name: Yup.string().required('Must be filled'),\n email: Yup.string().email().required('Must be filled'),\n password: Yup.string().min(8).required('Must be filled'),\n});\n\nexport default function RegisterForm() {\n const dispatch = useDispatch();\n\n // const handleSubmit = e => {\n // e.preventDefault();\n // const form = e.currentTarget;\n // dispatch(\n // register({\n // name: form.elements.name.value,\n // email: form.elements.email.value,\n // password: form.elements.password.value,\n // })\n // );\n // form.reset();\n // };\n\n const initialValues = { name: '', email: '', password: '' };\n\n return (\n <>\n

    Registration Form

    \n
    \n Have an account already? Sign Up please!\n
    \n {\n dispatch(register({ ...values }));\n // actions.resetForm();\n }}\n >\n \n \n \n \n \n \n \n \n );\n}\n\n// {/* ; */}\n","import { createGlobalStyle } from 'styled-components';\nimport registerImage from '../images/register.jpg';\n\nexport const RegisterStyle = createGlobalStyle`\nbody{\n /* background-image: url('https://kartinki.pics/uploads/posts/2021-07/thumbs/1625655412_56-kartinkin-com-p-biblioteka-art-art-krasivo-61.jpg'); */\n\n background-image: url(${registerImage});\n}\n`;\n","import { Helmet } from 'react-helmet';\nimport RegisterForm from 'components/RegisterForm/RegisterForm';\n// import { RegisterForm } from 'components/RegisterForm/RegisterForm';\nimport { RegisterStyle } from './Register.styled';\nimport { Box } from 'components/GlobalStyle';\n\nexport default function Register() {\n return (\n \n \n\n \n \n \n );\n}\n"],"names":["FormThumb","styled","Form","_templateObject","_taggedTemplateLiteral","formSchema","Yup","name","required","email","password","min","RegisterForm","dispatch","useDispatch","_jsxs","_Fragment","children","_jsx","Link","to","Formik","initialValues","validationSchema","onSubmit","values","actions","register","_objectSpread","autoComplete","Field","type","placeholder","ErrorMessage","component","RegisterStyle","createGlobalStyle","registerImage","Register","Box","Helmet","title"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/652.ac6426cc.chunk.js b/static/js/314.e98fa4bb.chunk.js similarity index 71% rename from static/js/652.ac6426cc.chunk.js rename to static/js/314.e98fa4bb.chunk.js index f90ddc5..1086a07 100644 --- a/static/js/652.ac6426cc.chunk.js +++ b/static/js/314.e98fa4bb.chunk.js @@ -1,2 +1,2 @@ -"use strict";(self.webpackChunkreact_homework_template=self.webpackChunkreact_homework_template||[]).push([[652],{9652:function(n,e,o){o.r(e),o.d(e,{default:function(){return k}});var r,t,a=o(4270),i=o(1413),l=o(5705),s=o(9434),d=o(6727),p=o(5822),c=o(168),u=o(5867),b=(0,u.zo)(l.l0)(r||(r=(0,c.Z)(["\n display: flex;\n flex-direction: column;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 480px;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px 28px;\n margin-bottom: 28px;\n\n button {\n font-weight: bold;\n margin-bottom: 28px;\n padding: 4px 8px;\n border-radius: 22px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n label {\n font-style: oblique;\n font-weight: 500;\n margin-bottom: 13px;\n\n b {\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n color: darkred;\n text-transform: lowercase;\n }\n\n input {\n margin-top: 8px;\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n text-align: center;\n /* background-color: rgba(255, 255, 255, 0); */\n }\n }\n"]))),m=o(184),x=d.Ry({email:d.Z_().email().required("Must be filled"),password:d.Z_().min(8).required("Must be filled")}),g=function(){var n=(0,s.I0)();return(0,m.jsx)(l.J9,{initialValues:{email:"",password:""},validationSchema:x,onSubmit:function(e,o){n((0,p.Ib)((0,i.Z)({},e)))},children:(0,m.jsxs)(b,{autoComplete:"off",children:[(0,m.jsxs)("label",{children:["Email",(0,m.jsx)(l.gN,{type:"email",name:"email",placeholder:"Enter your name"}),(0,m.jsx)(l.Bc,{name:"name",component:"b"})]}),(0,m.jsxs)("label",{children:["Password",(0,m.jsx)(l.gN,{type:"password",name:"password",placeholder:"Enter your password"}),(0,m.jsx)(l.Bc,{name:"password",component:"b"})]}),(0,m.jsx)("button",{type:"submit",children:"Log In"})]})})},h=(0,u.vJ)(t||(t=(0,c.Z)(["\nbody{\n background-image: url('https://kartinki.pics/uploads/posts/2021-07/1625655405_50-kartinkin-com-p-biblioteka-art-art-krasivo-55.jpg');\n}"]))),f=o(8346);function k(){return(0,m.jsxs)(f.x,{children:[(0,m.jsx)(a.q,{title:"Login"}),(0,m.jsx)("h2",{children:"Login Form"}),(0,m.jsx)("h5",{children:"Please sign up and let's work!!!"}),(0,m.jsx)(g,{}),(0,m.jsx)(h,{})]})}}}]); -//# sourceMappingURL=652.ac6426cc.chunk.js.map \ No newline at end of file +"use strict";(self.webpackChunkreact_homework_template=self.webpackChunkreact_homework_template||[]).push([[314],{8605:function(n,e,o){o.r(e),o.d(e,{default:function(){return w}});var r,t,a=o(4270),i=o(1413),l=o(5705),s=o(9434),d=o(6727),p=o(5822),c=o(168),u=o(5867),b=(0,u.zo)(l.l0)(r||(r=(0,c.Z)(["\n display: flex;\n flex-direction: column;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 480px;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px 28px;\n margin-bottom: 28px;\n\n button {\n font-weight: bold;\n margin-bottom: 28px;\n padding: 4px 8px;\n border-radius: 22px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n label {\n font-style: oblique;\n font-weight: 500;\n margin-bottom: 13px;\n\n b {\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n color: darkred;\n text-transform: lowercase;\n }\n\n input {\n margin-top: 8px;\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n text-align: center;\n /* background-color: rgba(255, 255, 255, 0); */\n }\n }\n"]))),m=o(184),x=d.Ry({email:d.Z_().email().required("Must be filled"),password:d.Z_().min(8).required("Must be filled")}),g=function(){var n=(0,s.I0)();return(0,m.jsx)(l.J9,{initialValues:{email:"",password:""},validationSchema:x,onSubmit:function(e,o){n((0,p.Ib)((0,i.Z)({},e)))},children:(0,m.jsxs)(b,{autoComplete:"off",children:[(0,m.jsxs)("label",{children:["Email",(0,m.jsx)(l.gN,{type:"email",name:"email",placeholder:"Enter your name"}),(0,m.jsx)(l.Bc,{name:"name",component:"b"})]}),(0,m.jsxs)("label",{children:["Password",(0,m.jsx)(l.gN,{type:"password",name:"password",placeholder:"Enter your password"}),(0,m.jsx)(l.Bc,{name:"password",component:"b"})]}),(0,m.jsx)("button",{type:"submit",children:"Log In"})]})})},h=o.p+"static/media/login.5740cd741ba41ee3920b.jpg",f=(0,u.vJ)(t||(t=(0,c.Z)(["\nbody{\n /* background-image: url('https://kartinki.pics/uploads/posts/2021-07/1625655405_50-kartinkin-com-p-biblioteka-art-art-krasivo-55.jpg'); */\n\n background-image: url(",");\n}"])),h),k=o(8346);function w(){return(0,m.jsxs)(k.x,{children:[(0,m.jsx)(a.q,{title:"Login"}),(0,m.jsx)("h2",{children:"Login Form"}),(0,m.jsx)("h5",{children:"Please sign up and let's work!!!"}),(0,m.jsx)(g,{}),(0,m.jsx)(f,{})]})}}}]); +//# sourceMappingURL=314.e98fa4bb.chunk.js.map \ No newline at end of file diff --git a/static/js/314.e98fa4bb.chunk.js.map b/static/js/314.e98fa4bb.chunk.js.map new file mode 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ACEX,EAAAA,EAAAA,MAACY,EAAAA,EAAG,CAAAb,SAAA,EACFT,EAAAA,EAAAA,KAACuB,EAAAA,EAAM,CAACC,MAAM,WAEdxB,EAAAA,EAAAA,KAAA,MAAAS,SAAI,gBACJT,EAAAA,EAAAA,KAAA,MAAAS,SAAI,sCACJT,EAAAA,EAAAA,KAACH,EAAS,KAEVG,EAAAA,EAAAA,KAACkB,EAAgB,MAGvB,C","sources":["components/LoginForm/LoginForm.styled.js","components/LoginForm/LoginForm.jsx","pages/Login.styled.js","pages/Login.jsx"],"sourcesContent":["import { Form } from 'formik';\nimport { styled } from 'styled-components';\n\nexport const FormThumb = styled(Form)`\n display: flex;\n flex-direction: column;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 480px;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px 28px;\n margin-bottom: 28px;\n\n button {\n font-weight: bold;\n margin-bottom: 28px;\n padding: 4px 8px;\n border-radius: 22px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n label {\n font-style: oblique;\n font-weight: 500;\n margin-bottom: 13px;\n\n b {\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n color: darkred;\n text-transform: lowercase;\n }\n\n input {\n margin-top: 8px;\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n text-align: center;\n /* background-color: rgba(255, 255, 255, 0); */\n }\n }\n`;\n","import { ErrorMessage, Field, Formik } from 'formik';\nimport { useDispatch } from 'react-redux';\nimport * as Yup from 'yup';\nimport { logIn } from 'redux/auth/authOperations';\nimport { FormThumb } from './LoginForm.styled';\n\nconst formSchema = Yup.object({\n email: Yup.string().email().required('Must be filled'),\n password: Yup.string().min(8).required('Must be filled'),\n});\n\nexport const LoginForm = () => {\n const dispatch = useDispatch();\n\n const initialValues = { email: '', password: '' };\n\n return (\n {\n dispatch(logIn({ ...values }));\n // actions.resetForm();\n }}\n >\n \n \n \n \n \n \n );\n};\n","import { createGlobalStyle } from 'styled-components';\nimport LoginImage from '../images/login.jpg';\n\nexport const LoginGlobalStyle = createGlobalStyle`\nbody{\n /* background-image: url('https://kartinki.pics/uploads/posts/2021-07/1625655405_50-kartinkin-com-p-biblioteka-art-art-krasivo-55.jpg'); */\n\n background-image: url(${LoginImage});\n}`;\n","import { Helmet } from 'react-helmet';\nimport { LoginForm } from 'components/LoginForm/LoginForm';\nimport { LoginGlobalStyle } from './Login.styled';\nimport { Box } from 'components/GlobalStyle';\n\nexport default function Login() {\n return (\n \n \n\n

    Login Form

    \n
    Please sign up and let's work!!!
    \n \n\n \n
    \n );\n}\n"],"names":["FormThumb","styled","Form","_templateObject","_taggedTemplateLiteral","formSchema","Yup","email","required","password","min","LoginForm","dispatch","useDispatch","_jsx","Formik","initialValues","validationSchema","onSubmit","values","actions","logIn","_objectSpread","children","_jsxs","autoComplete","Field","type","name","placeholder","ErrorMessage","component","LoginGlobalStyle","createGlobalStyle","LoginImage","Login","Box","Helmet","title"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/373.47eead40.chunk.js b/static/js/373.47eead40.chunk.js new file mode 100644 index 0000000..622182c --- /dev/null +++ b/static/js/373.47eead40.chunk.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkreact_homework_template=self.webpackChunkreact_homework_template||[]).push([[373,309],{8425:function(n,e,r){r.r(e),r.d(e,{default:function(){return x}});var t,a=r(4270),o=r(2799),i=r(6340),s=r(8346),l=r(168),d=r(5867),c=r.p+"static/media/home.af12a45630dd0e647adb.jpg",p=(0,d.vJ)(t||(t=(0,l.Z)(["\nbody{\n /* background-image: url('https://kartinki.pics/uploads/posts/2021-07/1625655366_42-kartinkin-com-p-biblioteka-art-art-krasivo-47.jpg'); */\n\n background-image: url(",");\n}\n\nsvg{\n width: 220px;\n height: 220px;\n color: midnightblue;\n}\n"])),c),u=r(8014),m=r(184);function x(){var n=(0,i.a)().isLoggedIn;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(a.q,{title:"Phonebook"}),n?(0,m.jsxs)(s.x,{children:[(0,m.jsx)("h1",{style:{fontSize:44},children:"WELCOME !!!"}),(0,m.jsx)("b",{style:{display:"inline-block",fontSize:22,marginBottom:"13px",textTransform:"uppercase"},children:"It's your"}),(0,m.jsx)("h2",{style:{fontSize:44},children:"Phonebook Organizer"}),(0,m.jsx)(u.xqN,{}),(0,m.jsx)(p,{})]}):(0,m.jsx)(o.default,{})]})}},2799:function(n,e,r){r.r(e),r.d(e,{default:function(){return w}});var t,a=r(4270),o=r(1413),i=r(5705),s=r(6727),l=r(9434),d=r(5822),c=r(168),p=r(5867),u=(0,p.zo)(i.l0)(t||(t=(0,c.Z)(["\n display: flex;\n flex-direction: column;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 480px;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px 28px;\n margin-bottom: 28px;\n\n button {\n font-weight: bold;\n margin-bottom: 28px;\n padding: 4px 8px;\n border-radius: 22px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n label {\n font-style: oblique;\n font-weight: 500;\n margin-bottom: 13px;\n\n b {\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n color: darkred;\n text-transform: lowercase;\n }\n\n input {\n margin-top: 8px;\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n text-align: center;\n /* background-color: rgba(255, 255, 255, 0); */\n }\n }\n"]))),m=r(1087),x=r(184),b=s.Ry({name:s.Z_().required("Must be filled"),email:s.Z_().email().required("Must be filled"),password:s.Z_().min(8).required("Must be filled")});function g(){var n=(0,l.I0)();return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("h2",{children:"Registration Form"}),(0,x.jsxs)("h5",{children:["Have an account already? ",(0,x.jsx)(m.rU,{to:"/login",children:"Sign Up"})," please!"]}),(0,x.jsx)(i.J9,{initialValues:{name:"",email:"",password:""},validationSchema:b,onSubmit:function(e,r){n((0,d.z2)((0,o.Z)({},e)))},children:(0,x.jsxs)(u,{autoComplete:"off",children:[(0,x.jsxs)("label",{children:["Username",(0,x.jsx)(i.gN,{type:"text",name:"name",placeholder:"Enter your name"}),(0,x.jsx)(i.Bc,{name:"name",component:"b"})]}),(0,x.jsxs)("label",{children:["Email",(0,x.jsx)(i.gN,{type:"email",name:"email",placeholder:"Enter your email"}),(0,x.jsx)(i.Bc,{name:"email",component:"b"})]}),(0,x.jsxs)("label",{children:["Password",(0,x.jsx)(i.gN,{type:"password",name:"password",placeholder:"Enter your password"}),(0,x.jsx)(i.Bc,{name:"password",component:"b"})]}),(0,x.jsx)("button",{type:"submit",children:"Register"})]})})]})}var h,f=r.p+"static/media/register.1bc32c8dda66de349989.jpg",j=(0,p.vJ)(h||(h=(0,c.Z)(["\nbody{\n /* background-image: url('https://kartinki.pics/uploads/posts/2021-07/thumbs/1625655412_56-kartinkin-com-p-biblioteka-art-art-krasivo-61.jpg'); */\n\n background-image: url(",");\n}\n"])),f),k=r(8346);function w(){return(0,x.jsxs)(k.x,{children:[(0,x.jsx)(a.q,{title:"Registration"}),(0,x.jsx)(g,{}),(0,x.jsx)(j,{})]})}}}]); +//# sourceMappingURL=373.47eead40.chunk.js.map \ No newline at end of file diff --git a/static/js/373.47eead40.chunk.js.map b/static/js/373.47eead40.chunk.js.map new file mode 100644 index 0000000..63b4a5a --- /dev/null +++ b/static/js/373.47eead40.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"static/js/373.47eead40.chunk.js","mappings":"4SAGaA,GAAkBC,EAAAA,EAAAA,IAAiBC,IAAAA,GAAAC,EAAAA,EAAAA,GAAA,mRAIpBC,G,mBCDb,SAASC,IACtB,IAAQC,GAAeC,EAAAA,EAAAA,KAAfD,WAER,OACEE,EAAAA,EAAAA,MAAAC,EAAAA,SAAA,CAAAC,SAAA,EACEC,EAAAA,EAAAA,K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AAA,EAAAA,MAACc,EAAS,CAACuB,aAAa,MAAKnC,SAAA,EAC3BF,EAAAA,EAAAA,MAAA,SAAAE,SAAA,CAAO,YAELC,EAAAA,EAAAA,KAACmC,EAAAA,GAAK,CAACC,KAAK,OAAOpB,KAAK,OAAOqB,YAAY,qBAC3CrC,EAAAA,EAAAA,KAACsC,EAAAA,GAAY,CAACtB,KAAK,OAAOuB,UAAU,UAEtC1C,EAAAA,EAAAA,MAAA,SAAAE,SAAA,CAAO,SAELC,EAAAA,EAAAA,KAACmC,EAAAA,GAAK,CAACC,KAAK,QAAQpB,KAAK,QAAQqB,YAAY,sBAC7CrC,EAAAA,EAAAA,KAACsC,EAAAA,GAAY,CAACtB,KAAK,QAAQuB,UAAU,UAEvC1C,EAAAA,EAAAA,MAAA,SAAAE,SAAA,CAAO,YAELC,EAAAA,EAAAA,KAACmC,EAAAA,GAAK,CACJC,KAAK,WACLpB,KAAK,WACLqB,YAAY,yBAEdrC,EAAAA,EAAAA,KAACsC,EAAAA,GAAY,CAACtB,KAAK,WAAWuB,UAAU,UAE1CvC,EAAAA,EAAAA,KAAA,UAAQoC,KAAK,SAAQrC,SAAC,oBAKhC,C,6DCpEayC,GAAgBlD,EAAAA,EAAAA,IAAiBC,IAAAA,GAAAC,EAAAA,EAAAA,GAAA,8MAIlBiD,G,UCDb,SAAS/B,IACtB,OACEb,EAAAA,EAAAA,MAACM,EAAAA,EAAG,CAAAJ,SAAA,EACFC,EAAAA,EAAAA,KAACC,EAAAA,EAAM,CAACC,MAAM,kBAEdF,EAAAA,EAAAA,KAACqB,EAAY,KACbrB,EAAAA,EAAAA,KAACwC,EAAa,MAGpB,C","sources":["pages/Home.styled.js","pages/Home.jsx","components/RegisterForm/RegisterForm.styled.js","components/RegisterForm/RegisterForm.jsx","pages/Register.styled.js","pages/Register.jsx"],"sourcesContent":["import { createGlobalStyle } from 'styled-components';\nimport HomeImage from '../images/home.jpg';\n\nexport const HomeGlobalStyle = createGlobalStyle`\nbody{\n /* background-image: url('https://kartinki.pics/uploads/posts/2021-07/1625655366_42-kartinkin-com-p-biblioteka-art-art-krasivo-47.jpg'); */\n\n background-image: url(${HomeImage});\n}\n\nsvg{\n width: 220px;\n height: 220px;\n color: midnightblue;\n}\n`;\n","import { Helmet } from 'react-helmet';\nimport Register from './Register';\nimport { useAuth } from 'hooks';\nimport { Box } from 'components/GlobalStyle';\nimport { HomeGlobalStyle } from './Home.styled';\nimport { GiOldMicrophone } from 'react-icons/gi';\nexport default function Home() {\n const { isLoggedIn } = useAuth();\n\n return (\n <>\n \n\n {!isLoggedIn ? (\n \n ) : (\n \n

    WELCOME !!!

    \n \n It's your\n \n

    Phonebook Organizer

    \n\n \n \n
    \n )}\n \n );\n}\n","import { Form } from 'formik';\nimport { styled } from 'styled-components';\n\nexport const FormThumb = styled(Form)`\n display: flex;\n flex-direction: column;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 480px;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px 28px;\n margin-bottom: 28px;\n\n button {\n font-weight: bold;\n margin-bottom: 28px;\n padding: 4px 8px;\n border-radius: 22px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n label {\n font-style: oblique;\n font-weight: 500;\n margin-bottom: 13px;\n\n b {\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n color: darkred;\n text-transform: lowercase;\n }\n\n input {\n margin-top: 8px;\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n text-align: center;\n /* background-color: rgba(255, 255, 255, 0); */\n }\n }\n`;\n","import { ErrorMessage, Field, Formik } from 'formik';\nimport * as Yup from 'yup';\nimport { useDispatch } from 'react-redux';\nimport { register } from 'redux/auth/authOperations';\nimport { FormThumb } from './RegisterForm.styled';\nimport { Link } from 'react-router-dom';\n// import LoadingSpinnerComponent from 'react-spinners-components';\n\nconst formSchema = Yup.object({\n name: Yup.string().required('Must be filled'),\n email: Yup.string().email().required('Must be filled'),\n password: Yup.string().min(8).required('Must be filled'),\n});\n\nexport default function RegisterForm() {\n const dispatch = useDispatch();\n\n // const handleSubmit = e => {\n // e.preventDefault();\n // const form = e.currentTarget;\n // dispatch(\n // register({\n // name: form.elements.name.value,\n // email: form.elements.email.value,\n // password: form.elements.password.value,\n // })\n // );\n // form.reset();\n // };\n\n const initialValues = { name: '', email: '', password: '' };\n\n return (\n <>\n

    Registration Form

    \n
    \n Have an account already? Sign Up please!\n
    \n {\n dispatch(register({ ...values }));\n // actions.resetForm();\n }}\n >\n \n \n \n \n \n \n \n \n );\n}\n\n// {/* ; */}\n","import { createGlobalStyle } from 'styled-components';\nimport registerImage from '../images/register.jpg';\n\nexport const RegisterStyle = createGlobalStyle`\nbody{\n /* background-image: url('https://kartinki.pics/uploads/posts/2021-07/thumbs/1625655412_56-kartinkin-com-p-biblioteka-art-art-krasivo-61.jpg'); */\n\n background-image: url(${registerImage});\n}\n`;\n","import { Helmet } from 'react-helmet';\nimport RegisterForm from 'components/RegisterForm/RegisterForm';\n// import { RegisterForm } from 'components/RegisterForm/RegisterForm';\nimport { RegisterStyle } from './Register.styled';\nimport { Box } from 'components/GlobalStyle';\n\nexport default function Register() {\n return (\n \n \n\n \n \n \n );\n}\n"],"names":["HomeGlobalStyle","createGlobalStyle","_templateObject","_taggedTemplateLiteral","HomeImage","Home","isLoggedIn","useAuth","_jsxs","_Fragment","children","_jsx","Helmet","title","Box","style","fontSize","display","marginBottom","textTransform","GiOldMicrophone","Register","FormThumb","styled","Form","formSchema","Yup","name","required","email","password","min","RegisterForm","dispatch","useDispatch","Link","to","Formik","initialValues","validationSchema","onSubmit","values","actions","register","_objectSpread","autoComplete","Field","type","placeholder","ErrorMessage","component","RegisterStyle","registerImage"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/452.30f6de00.chunk.js b/static/js/452.30f6de00.chunk.js deleted file mode 100644 index 4d57282..0000000 --- a/static/js/452.30f6de00.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";(self.webpackChunkreact_homework_template=self.webpackChunkreact_homework_template||[]).push([[452],{4452:function(n,e,r){r.r(e),r.d(e,{default:function(){return k}});var t,a,o=r(4270),i=r(1413),l=r(5705),s=r(6727),d=r(9434),p=r(5822),c=r(168),u=r(5867),m=(0,u.zo)(l.l0)(t||(t=(0,c.Z)(["\n display: flex;\n flex-direction: column;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 480px;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px 28px;\n margin-bottom: 28px;\n\n button {\n font-weight: bold;\n margin-bottom: 28px;\n padding: 4px 8px;\n border-radius: 22px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n label {\n font-style: oblique;\n font-weight: 500;\n margin-bottom: 13px;\n\n b {\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n color: darkred;\n text-transform: lowercase;\n }\n\n input {\n margin-top: 8px;\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n text-align: center;\n /* background-color: rgba(255, 255, 255, 0); */\n }\n }\n"]))),x=r(1087),b=r(184),g=s.Ry({name:s.Z_().required("Must be filled"),email:s.Z_().email().required("Must be filled"),password:s.Z_().min(8).required("Must be filled")});function h(){var n=(0,d.I0)();return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h2",{children:"Registration Form"}),(0,b.jsxs)("h5",{children:["Have an account already? ",(0,b.jsx)(x.rU,{to:"/login",children:"Sign Up"})," please!"]}),(0,b.jsx)(l.J9,{initialValues:{name:"",email:"",password:""},validationSchema:g,onSubmit:function(e,r){n((0,p.z2)((0,i.Z)({},e)))},children:(0,b.jsxs)(m,{autoComplete:"off",children:[(0,b.jsxs)("label",{children:["Username",(0,b.jsx)(l.gN,{type:"text",name:"name",placeholder:"Enter your name"}),(0,b.jsx)(l.Bc,{name:"name",component:"b"})]}),(0,b.jsxs)("label",{children:["Email",(0,b.jsx)(l.gN,{type:"email",name:"email",placeholder:"Enter your email"}),(0,b.jsx)(l.Bc,{name:"email",component:"b"})]}),(0,b.jsxs)("label",{children:["Password",(0,b.jsx)(l.gN,{type:"password",name:"password",placeholder:"Enter your password"}),(0,b.jsx)(l.Bc,{name:"password",component:"b"})]}),(0,b.jsx)("button",{type:"submit",children:"Register"})]})})]})}var f=(0,u.vJ)(a||(a=(0,c.Z)(["\nbody{\n background-image: url('https://kartinki.pics/uploads/posts/2021-07/thumbs/1625655412_56-kartinkin-com-p-biblioteka-art-art-krasivo-61.jpg');\n}\n"]))),j=r(8346);function k(){return(0,b.jsxs)(j.x,{children:[(0,b.jsx)(o.q,{title:"Registration"}),(0,b.jsx)(h,{}),(0,b.jsx)(f,{})]})}}}]); -//# sourceMappingURL=452.30f6de00.chunk.js.map \ No newline at end of file diff --git a/static/js/452.30f6de00.chunk.js.map b/static/js/452.30f6de00.chunk.js.map deleted file mode 100644 index 97705c2..0000000 --- a/static/js/452.30f6de00.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/js/452.30f6de00.chunk.js","mappings":"2QAGaA,GAAYC,EAAAA,EAAAA,IAAOC,EAAAA,GAAPD,CAAYE,IAAAA,GAAAC,EAAAA,EAAAA,GAAA,g/B,mBCK/BC,EAAaC,EAAAA,GAAW,CAC5BC,KAAMD,EAAAA,KAAaE,SAAS,kBAC5BC,MAAOH,EAAAA,KAAaG,QAAQD,SAAS,kBACrCE,SAAUJ,EAAAA,KAAaK,IAAI,GAAGH,SAAS,oBAG1B,SAASI,IACtB,IAAMC,GAAWC,EAAAA,EAAAA,MAiBjB,OACEC,EAAAA,EAAAA,MAAAC,EAAAA,SAAA,CAAAC,SAAA,EACEC,EAAAA,EAAAA,KAAA,MAAAD,SAAI,uBACJF,EAAAA,EAAAA,MAAA,MAAAE,SAAA,CAAI,6BACuBC,EAAAA,EAAAA,KAACC,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EAAAA,KAACN,EAAY,KACbM,EAAAA,EAAAA,KAACiB,EAAa,MAGpB,C","sources":["components/RegisterForm/RegisterForm.styled.js","components/RegisterForm/RegisterForm.jsx","pages/Register.styled.js","pages/Register.jsx"],"sourcesContent":["import { Form } from 'formik';\nimport { styled } from 'styled-components';\n\nexport const FormThumb = styled(Form)`\n display: flex;\n flex-direction: column;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 480px;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px 28px;\n margin-bottom: 28px;\n\n button {\n font-weight: bold;\n margin-bottom: 28px;\n padding: 4px 8px;\n border-radius: 22px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n label {\n font-style: oblique;\n font-weight: 500;\n margin-bottom: 13px;\n\n b {\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n color: darkred;\n text-transform: lowercase;\n }\n\n input {\n margin-top: 8px;\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n text-align: center;\n /* background-color: rgba(255, 255, 255, 0); */\n }\n }\n`;\n","import { ErrorMessage, Field, Formik } from 'formik';\nimport * as Yup from 'yup';\nimport { useDispatch } from 'react-redux';\nimport { register } from 'redux/auth/authOperations';\nimport { FormThumb } from './RegisterForm.styled';\nimport { Link } from 'react-router-dom';\n// import LoadingSpinnerComponent from 'react-spinners-components';\n\nconst formSchema = Yup.object({\n name: Yup.string().required('Must be filled'),\n email: Yup.string().email().required('Must be filled'),\n password: Yup.string().min(8).required('Must be filled'),\n});\n\nexport default function RegisterForm() {\n const dispatch = useDispatch();\n\n // const handleSubmit = e => {\n // e.preventDefault();\n // const form = e.currentTarget;\n // dispatch(\n // register({\n // name: form.elements.name.value,\n // email: form.elements.email.value,\n // password: form.elements.password.value,\n // })\n // );\n // form.reset();\n // };\n\n const initialValues = { name: '', email: '', password: '' };\n\n return (\n <>\n

    Registration Form

    \n
    \n Have an account already? Sign Up please!\n
    \n {\n dispatch(register({ ...values }));\n // actions.resetForm();\n }}\n >\n \n \n \n \n \n \n \n \n );\n}\n\n// {/* ; */}\n","import { createGlobalStyle } from 'styled-components';\n\nexport const RegisterStyle = createGlobalStyle`\nbody{\n background-image: url('https://kartinki.pics/uploads/posts/2021-07/thumbs/1625655412_56-kartinkin-com-p-biblioteka-art-art-krasivo-61.jpg');\n}\n`;\n","import { Helmet } from 'react-helmet';\nimport RegisterForm from 'components/RegisterForm/RegisterForm';\n// import { RegisterForm } from 'components/RegisterForm/RegisterForm';\nimport { RegisterStyle } from './Register.styled';\nimport { Box } from 'components/GlobalStyle';\n\nexport default function Register() {\n return (\n \n \n\n \n \n \n );\n}\n"],"names":["FormThumb","styled","Form","_templateObject","_taggedTemplateLiteral","formSchema","Yup","name","required","email","password","min","RegisterForm","dispatch","useDispatch","_jsxs","_Fragment","children","_jsx","Link","to","Formik","initialValues","validationSchema","onSubmit","values","actions","register","_objectSpread","autoComplete","Field","type","placeholder","ErrorMessage","component","RegisterStyle","createGlobalStyle","Register","Box","Helmet","title"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/899.ce56b1d1.chunk.js b/static/js/461.28d98f2e.chunk.js similarity index 62% rename from static/js/899.ce56b1d1.chunk.js rename to static/js/461.28d98f2e.chunk.js index 89e9a90..4e342f4 100644 --- a/static/js/899.ce56b1d1.chunk.js +++ b/static/js/461.28d98f2e.chunk.js @@ -1,2 +1,2 @@ -"use strict";(self.webpackChunkreact_homework_template=self.webpackChunkreact_homework_template||[]).push([[899],{3899:function(n,e,t){t.r(e),t.d(e,{default:function(){return B}});var r,o=t(2791),a=t(9434),i=t(4270),s=t(1413),c=t(5705),l=t(6727),u=t(2946),d=t(3634),p=t(168),x=t(5867),b=(0,x.ZP)(c.l0)(r||(r=(0,p.Z)(["\n display: flex;\n flex-direction: column;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 480px;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px 28px;\n margin-bottom: 28px;\n\n /* transform: scale(0.5);\n opacity: 0.3;\n transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1),\n opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);\n\n &:hover {\n transform: scale(1);\n opacity: 1;\n } */\n\n button {\n font-weight: bold;\n margin-bottom: 28px;\n padding: 4px 8px;\n border-radius: 22px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n label {\n font-style: oblique;\n font-weight: 500;\n margin-bottom: 13px;\n\n b {\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n color: darkred;\n text-transform: lowercase;\n }\n\n input {\n margin-top: 8px;\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n text-align: center;\n /* background-color: rgba(255, 255, 255, 0); */\n }\n }\n"]))),m=t(184),f=l.Ry().shape({name:l.Z_().matches(/^[a-zA-Za-\u044f\u0410-\u042f]+(([' -][a-zA-Za-\u044f\u0410-\u042f ])?[a-zA-Za-\u044f\u0410-\u042f]*)*$/,"Wrong name format").required("Must be filled"),number:l.Z_().matches(/^\+?\d{1,4}?[-.\s]?\(?\d{1,3}?\)?[-.\s]?\d{1,4}[-.\s]?\d{1,4}[-.\s]?\d{1,9}$/,"Wrong number format").required("Must be filled")});function h(){var n=(0,a.I0)(),e=(0,a.v9)(u.Af);return(0,m.jsx)(c.J9,{initialValues:{name:"",number:""},validationSchema:f,onSubmit:function(t,r){var o=t.name;e.some((function(n){return n.name.toLowerCase()===o.toLowerCase()}))?alert("".concat(o," is already in contacts.")):(n((0,d.v6)((0,s.Z)({},t))),r.resetForm())},children:(0,m.jsxs)(b,{children:[(0,m.jsxs)("label",{children:["Name",(0,m.jsx)(c.gN,{name:"name",placeholder:"Enter name"}),(0,m.jsx)(c.Bc,{name:"name",component:"b"})]}),(0,m.jsxs)("label",{children:["Number",(0,m.jsx)(c.gN,{type:"tel",name:"number",placeholder:"Enter number"}),(0,m.jsx)(c.Bc,{name:"number",component:"b"})]}),(0,m.jsx)("button",{type:"submit",children:"Add contact"})]})})}var g,j,v,y,w=t(8617),k=t(7689),Z=t(1087),z=x.zo.div(g||(g=(0,p.Z)(["\n display: flex;\n align-items: center;\n color: black;\n border: 2px outset darkgrey;\n padding: 2px;\n border-radius: 18px;\n cursor: pointer;\n transition: transform 800ms cubic-bezier(0.4, 0, 0.2, 1);\n\n &:hover {\n transform: scale(1.1);\n }\n"]))),L=(0,x.zo)(Z.rU)(j||(j=(0,p.Z)(["\n display: flex;\n width: 100%;\n color: black;\n text-decoration: none;\n\n &:visited {\n color: black;\n }\n\n div {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n\n span {\n display: inline-block;\n font-size: 18px;\n font-weight: 700;\n margin-left: 13px;\n font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande',\n 'Lucida Sans', Arial, sans-serif;\n margin-right: auto;\n }\n\n b {\n margin-right: 48px;\n color: whitesmoke;\n }\n }\n"]))),S=x.zo.button(v||(v=(0,p.Z)(["\n display: block;\n font-size: 13px;\n font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande',\n 'Lucida Sans', Arial, sans-serif;\n padding: 2px 8px;\n color: white;\n background-color: black;\n border-radius: 13px;\n transition: transform 800ms cubic-bezier(0.4, 0, 0.2, 1);\n\n &:hover {\n background-color: transparent;\n color: buttonborder;\n transform: scale(1.2);\n }\n"])));function A(n){var e=n.contact,t=e.id,r=e.name,o=e.number,i=(0,a.I0)(),s=(0,k.TH)();return(0,m.jsxs)(z,{children:[(0,m.jsxs)(L,{to:"/contacts/".concat(t),state:{from:s},children:[(0,m.jsx)(w.Vel,{size:22}),(0,m.jsxs)("div",{children:[(0,m.jsx)("span",{children:r}),(0,m.jsxs)("b",{children:[o," "]})]})]}),(0,m.jsx)(S,{type:"button",onClick:function(){return i((0,d.in)(t))},children:"Delete"})]})}var C=x.ZP.ul(y||(y=(0,p.Z)(["\n width: 666px;\n display: flex;\n flex-direction: column;\n gap: 13px;\n margin: auto;\n font-weight: 500;\n"])));function F(){var n=(0,a.v9)(u.hF);return(0,m.jsx)(C,{children:n.map((function(n){return(0,m.jsx)("li",{children:(0,m.jsx)(A,{contact:n})},n.id)}))})}var _,G,M=t(4808),P=x.ZP.div(_||(_=(0,p.Z)(["\n input {\n margin-top: 8px;\n margin-bottom: 22px;\n width: 480px;\n padding: 2px 13px;\n border-radius: 13px;\n text-align: center;\n outline: none;\n }\n\n ::placeholder {\n text-align: center;\n }\n"])));function T(){var n=(0,a.I0)(),e=(0,a.v9)(u.AD);return(0,m.jsx)(P,{children:(0,m.jsx)("input",{type:"text",value:e,onChange:function(e){return t=e.target.value,void n((0,M.y)(t));var t},placeholder:"Search..."})})}var $=x.zo.span(G||(G=(0,p.Z)(["\n display: inline-flex;\n justify-content: space-between;\n /* align-items: center; */\n width: 333px;\n margin-bottom: 15px;\n font-size: 18px;\n font-weight: 600;\n font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande',\n 'Lucida Sans', Arial, sans-serif;\n"])));function q(){var n=(0,a.v9)(u.hF),e=(0,a.v9)(u.G$);return(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)($,{children:[(0,m.jsxs)("div",{children:["Total contacts:",(0,m.jsxs)("b",{children:[" ",e]})]})," ",(0,m.jsxs)("div",{children:["Shown contacts:",(0,m.jsxs)("b",{children:[" ",n.length]})]})]})})}function I(n){var e=n.message;return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("b",{children:e})})}var N,U=t(8346),D=(0,x.vJ)(N||(N=(0,p.Z)(["\nbody{\n background-image: url('https://bogatyr.club/uploads/posts/2023-03/1679420906_bogatyr-club-p-biblioteka-oboi-foni-pinterest-1.jpg');\n}"]))),E=t(5218);function B(){var n=(0,a.I0)(),e=(0,a.v9)(u.G$);return(0,o.useEffect)((function(){n((0,d.yF)())}),[n]),(0,m.jsxs)(U.x,{children:[(0,m.jsx)(i.q,{title:"Your contacts"}),(0,m.jsx)("h1",{children:"Phonebook"}),(0,m.jsx)(h,{}),(0,m.jsx)("h2",{children:"Contacts"}),(0,m.jsx)(q,{}),(0,m.jsx)(T,{}),0===e?(0,m.jsx)(I,{message:"Oops! Contact's list is empty..."}):(0,m.jsx)(F,{}),(0,m.jsx)(D,{}),(0,m.jsx)(E.x7,{})]})}},2946:function(n,e,t){t.d(e,{AD:function(){return i},Af:function(){return o},G$:function(){return a},hF:function(){return s}});var r=t(6916),o=function(n){return n.contacts.items},a=function(n){return n.contacts.items.length},i=function(n){return n.filter},s=(0,r.P1)([o,i],(function(n,e){return n.filter((function(n){return n.name.toLowerCase().includes(e.toLowerCase())}))}))}}]); -//# sourceMappingURL=899.ce56b1d1.chunk.js.map \ No newline at end of file +"use strict";(self.webpackChunkreact_homework_template=self.webpackChunkreact_homework_template||[]).push([[461],{9193:function(n,e,t){t.r(e),t.d(e,{default:function(){return J}});var r,a=t(2791),o=t(9434),i=t(4270),c=t(1413),s=t(5705),l=t(6727),d=t(2946),u=t(3634),p=t(168),x=t(5867),b=(0,x.ZP)(s.l0)(r||(r=(0,p.Z)(["\n display: flex;\n flex-direction: column;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 480px;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px 28px;\n margin-bottom: 28px;\n\n /* transform: scale(0.5);\n opacity: 0.3;\n transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1),\n opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);\n\n &:hover {\n transform: scale(1);\n opacity: 1;\n } */\n\n button {\n font-weight: bold;\n margin-bottom: 28px;\n padding: 4px 8px;\n border-radius: 22px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n label {\n font-style: oblique;\n font-weight: 500;\n margin-bottom: 13px;\n\n b {\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n color: darkred;\n text-transform: lowercase;\n }\n\n input {\n margin-top: 8px;\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n text-align: center;\n /* background-color: rgba(255, 255, 255, 0); */\n }\n }\n"]))),m=t(184),f=l.Ry().shape({name:l.Z_().matches(/^[a-zA-Za-\u044f\u0410-\u042f]+(([' -][a-zA-Za-\u044f\u0410-\u042f ])?[a-zA-Za-\u044f\u0410-\u042f]*)*$/,"Wrong name format").required("Must be filled"),number:l.Z_().matches(/^\+?\d{1,4}?[-.\s]?\(?\d{1,3}?\)?[-.\s]?\d{1,4}[-.\s]?\d{1,4}[-.\s]?\d{1,9}$/,"Wrong number format").required("Must be filled")});function h(){var n=(0,o.I0)(),e=(0,o.v9)(d.Af);return(0,m.jsx)(s.J9,{initialValues:{name:"",number:""},validationSchema:f,onSubmit:function(t,r){var a=t.name;e.some((function(n){return n.name.toLowerCase()===a.toLowerCase()}))?alert("".concat(a," is already in contacts.")):(n((0,u.v6)((0,c.Z)({},t))),r.resetForm())},children:(0,m.jsxs)(b,{children:[(0,m.jsxs)("label",{children:["Name",(0,m.jsx)(s.gN,{name:"name",placeholder:"Enter name"}),(0,m.jsx)(s.Bc,{name:"name",component:"b"})]}),(0,m.jsxs)("label",{children:["Number",(0,m.jsx)(s.gN,{type:"tel",name:"number",placeholder:"Enter number"}),(0,m.jsx)(s.Bc,{name:"number",component:"b"})]}),(0,m.jsx)("button",{type:"submit",children:"Add contact"})]})})}var g,j,v,y,k=t(8617),w=t(7689),Z=t(1087),z=x.zo.div(g||(g=(0,p.Z)(["\n display: flex;\n align-items: center;\n color: black;\n border: 2px outset darkgrey;\n padding: 2px;\n border-radius: 18px;\n cursor: pointer;\n transition: transform 800ms cubic-bezier(0.4, 0, 0.2, 1);\n\n &:hover {\n transform: scale(1.1);\n }\n"]))),L=(0,x.zo)(Z.rU)(j||(j=(0,p.Z)(["\n display: flex;\n width: 100%;\n color: black;\n text-decoration: none;\n\n &:visited {\n color: black;\n }\n\n div {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n\n span {\n display: inline-block;\n font-size: 18px;\n font-weight: 700;\n margin-left: 13px;\n font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande',\n 'Lucida Sans', Arial, sans-serif;\n margin-right: auto;\n }\n\n b {\n margin-right: 48px;\n color: whitesmoke;\n }\n }\n"]))),S=x.zo.button(v||(v=(0,p.Z)(["\n display: block;\n font-size: 13px;\n font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande',\n 'Lucida Sans', Arial, sans-serif;\n padding: 2px 8px;\n color: white;\n background-color: black;\n border-radius: 13px;\n transition: transform 800ms cubic-bezier(0.4, 0, 0.2, 1);\n\n &:hover {\n background-color: transparent;\n color: buttonborder;\n transform: scale(1.2);\n }\n"])));function A(n){var e=n.contact,t=e.id,r=e.name,a=e.number,i=(0,o.I0)(),c=(0,w.TH)();return(0,m.jsxs)(z,{children:[(0,m.jsxs)(L,{to:"/contacts/".concat(t),state:{from:c},children:[(0,m.jsx)(k.Vel,{size:22}),(0,m.jsxs)("div",{children:[(0,m.jsx)("span",{children:r}),(0,m.jsxs)("b",{children:[a," "]})]})]}),(0,m.jsx)(S,{type:"button",onClick:function(){return i((0,u.in)(t))},children:"Delete"})]})}var C=x.ZP.ul(y||(y=(0,p.Z)(["\n width: 666px;\n display: flex;\n flex-direction: column;\n gap: 13px;\n margin: auto;\n font-weight: 500;\n"])));function F(){var n=(0,o.v9)(d.hF);return(0,m.jsx)(C,{children:n.map((function(n){return(0,m.jsx)("li",{children:(0,m.jsx)(A,{contact:n})},n.id)}))})}var _,G,M=t(4808),P=x.ZP.div(_||(_=(0,p.Z)(["\n input {\n margin-top: 8px;\n margin-bottom: 22px;\n width: 480px;\n padding: 2px 13px;\n border-radius: 13px;\n text-align: center;\n outline: none;\n }\n\n ::placeholder {\n text-align: center;\n }\n"])));function T(){var n=(0,o.I0)(),e=(0,o.v9)(d.AD);return(0,m.jsx)(P,{children:(0,m.jsx)("input",{type:"text",value:e,onChange:function(e){return t=e.target.value,void n((0,M.y)(t));var t},placeholder:"Search..."})})}var $=x.zo.span(G||(G=(0,p.Z)(["\n display: inline-flex;\n justify-content: space-between;\n /* align-items: center; */\n width: 333px;\n margin-bottom: 15px;\n font-size: 18px;\n font-weight: 600;\n font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande',\n 'Lucida Sans', Arial, sans-serif;\n"])));function q(){var n=(0,o.v9)(d.hF),e=(0,o.v9)(d.G$);return(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)($,{children:[(0,m.jsxs)("div",{children:["Total contacts:",(0,m.jsxs)("b",{children:[" ",e]})]})," ",(0,m.jsxs)("div",{children:["Shown contacts:",(0,m.jsxs)("b",{children:[" ",n.length]})]})]})})}function I(n){var e=n.message;return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("b",{children:e})})}var N,U=t(8346),D=t.p+"static/media/contacts.10ca8ca6c6494bd8c807.jpg",E=(0,x.vJ)(N||(N=(0,p.Z)(["\nbody{\n /* background-image: url('https://bogatyr.club/uploads/posts/2023-03/1679420906_bogatyr-club-p-biblioteka-oboi-foni-pinterest-1.jpg'); */\n\n background-image: url(",");\n}"])),D),B=t(5218);function J(){var n=(0,o.I0)(),e=(0,o.v9)(d.G$);return(0,a.useEffect)((function(){n((0,u.yF)())}),[n]),(0,m.jsxs)(U.x,{children:[(0,m.jsx)(i.q,{title:"Your contacts"}),(0,m.jsx)("h1",{children:"Phonebook"}),(0,m.jsx)(h,{}),(0,m.jsx)("h2",{children:"Contacts"}),(0,m.jsx)(q,{}),(0,m.jsx)(T,{}),0===e?(0,m.jsx)(I,{message:"Oops! Contact's list is empty..."}):(0,m.jsx)(F,{}),(0,m.jsx)(E,{}),(0,m.jsx)(B.x7,{})]})}},2946:function(n,e,t){t.d(e,{AD:function(){return i},Af:function(){return a},G$:function(){return o},hF:function(){return c}});var r=t(6916),a=function(n){return n.contacts.items},o=function(n){return n.contacts.items.length},i=function(n){return n.filter},c=(0,r.P1)([a,i],(function(n,e){return n.filter((function(n){return n.name.toLowerCase().includes(e.toLowerCase())}))}))}}]); +//# sourceMappingURL=461.28d98f2e.chunk.js.map \ No newline at end of file diff --git a/static/js/461.28d98f2e.chunk.js.map b/static/js/461.28d98f2e.chunk.js.map new file mode 100644 index 0000000..6334386 --- /dev/null +++ b/static/js/461.28d98f2e.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"static/js/461.28d98f2e.chunk.js","mappings":"6RAGaA,GAAYC,EAAAA,EAAAA,IAAOC,EAAAA,GAAPD,CAAYE,IAAAA,GAAAC,EAAAA,EAAAA,GAAA,8sC,SCI/BC,EAAaC,EAAAA,KAAaC,MAAM,CACpCC,KAAMF,EAAAA,KACHG,QACC,0GACA,qBAEDC,SAAS,kBACZC,OAAQL,EAAAA,KACLG,QACC,+EACA,uBAEDC,SAAS,oBAGC,SAASE,IACtB,IAAMC,GAAWC,EAAAA,EAAAA,MACXC,GAAWC,EAAAA,EAAAA,IAAYC,EAAAA,IAI7B,OACEC,EAAAA,EAAAA,KAACC,EAAAA,GAAM,CACLC,cAJkB,CAAEZ,KAAM,GAAIG,OAAQ,IAKtCU,iBAAkBhB,EAClBiB,SAAU,SAACC,EAAQC,GACjB,IAAMC,EAAcF,EAAOf,KAGzBO,EAASW,MACP,SAAAC,GAAO,OAAIA,EAAQnB,KAAKoB,gBAAkBH,EAAYG,aAAa,IAGrEC,MAAM,GAADC,OAAIL,EAAW,8BAItBZ,GAASkB,EAAAA,EAAAA,KAAeC,EAAAA,EAAAA,GAAC,CAAC,EAAIT,KAC9BC,EAAQS,YACV,EAAEC,UAEFC,EAAAA,EAAAA,MAACnC,EAAS,CAAAkC,SAAA,EACRC,EAAAA,EAAAA,MAAA,SAAAD,SAAA,CAAO,QAELhB,EAAAA,EAAAA,KAACkB,EAAAA,GAAK,CAAC5B,KAAK,O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AO,EAErCJ,GAAwBgC,EAAAA,EAAAA,IACnC,CAAC7E,EAAgBkD,IACjB,SAACpD,EAAUgF,GAAW,OACpBhF,EAASmD,QAAO,SAAAvC,GAAO,OACrBA,EAAQnB,KAAKoB,cAAcoE,SAASD,EAAYnE,cAAc,GAC/D,G","sources":["components/ContactForm/ContactForm.styled.js","components/ContactForm/ContactForm.jsx","components/ContactItem/ContactItem.styled.js","components/ContactItem/ContactItem.jsx","components/ContactList/ContactList.styled.js","components/ContactList/ContactList.jsx","components/Filter/Filter.styled.js","components/Filter/Filter.jsx","components/CountOfContacts/CountOfContacts.styled.js","components/CountOfContacts/CountOfContacts.jsx","components/Message/Message.jsx","pages/Contacts.styled.js","pages/Contacts.jsx","redux/contacts/selectors.js"],"sourcesContent":["import { Form } from 'formik';\nimport styled from 'styled-components';\n\nexport const FormThumb = styled(Form)`\n display: flex;\n flex-direction: column;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 480px;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px 28px;\n margin-bottom: 28px;\n\n /* transform: scale(0.5);\n opacity: 0.3;\n transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1),\n opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);\n\n &:hover {\n transform: scale(1);\n opacity: 1;\n } */\n\n button {\n font-weight: bold;\n margin-bottom: 28px;\n padding: 4px 8px;\n border-radius: 22px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n label {\n font-style: oblique;\n font-weight: 500;\n margin-bottom: 13px;\n\n b {\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n color: darkred;\n text-transform: lowercase;\n }\n\n input {\n margin-top: 8px;\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n text-align: center;\n /* background-color: rgba(255, 255, 255, 0); */\n }\n }\n`;\n","import { Formik, Field, ErrorMessage } from 'formik';\nimport * as Yup from 'yup';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { selectContacts } from 'redux/contacts/selectors';\nimport { fetchAddContact } from 'redux/contacts/operations';\nimport { FormThumb } from './ContactForm.styled';\n\nconst formSchema = Yup.object().shape({\n name: Yup.string()\n .matches(\n /^[a-zA-Za-яА-Я]+(([' -][a-zA-Za-яА-Я ])?[a-zA-Za-яА-Я]*)*$/,\n 'Wrong name format'\n )\n .required('Must be filled'),\n number: Yup.string()\n .matches(\n /^\\+?\\d{1,4}?[-.\\s]?\\(?\\d{1,3}?\\)?[-.\\s]?\\d{1,4}[-.\\s]?\\d{1,4}[-.\\s]?\\d{1,9}$/,\n 'Wrong number format'\n )\n .required('Must be filled'),\n});\n\nexport default function ContactForm() {\n const dispatch = useDispatch();\n const contacts = useSelector(selectContacts);\n\n const initialValues = { name: '', number: '' };\n\n return (\n {\n const enteredName = values.name;\n\n if (\n contacts.some(\n contact => contact.name.toLowerCase() === enteredName.toLowerCase()\n )\n ) {\n alert(`${enteredName} is already in contacts.`);\n return;\n }\n\n dispatch(fetchAddContact({ ...values }));\n actions.resetForm();\n }}\n >\n \n \n\n \n\n \n \n \n );\n}\n","import { Link } from 'react-router-dom';\nimport { styled } from 'styled-components';\n\nexport const ListItem = styled.div`\n display: flex;\n align-items: center;\n color: black;\n border: 2px outset darkgrey;\n padding: 2px;\n border-radius: 18px;\n cursor: pointer;\n transition: transform 800ms cubic-bezier(0.4, 0, 0.2, 1);\n\n &:hover {\n transform: scale(1.1);\n }\n`;\n\nexport const ListItemLink = styled(Link)`\n display: flex;\n width: 100%;\n color: black;\n text-decoration: none;\n\n &:visited {\n color: black;\n }\n\n div {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n\n span {\n display: inline-block;\n font-size: 18px;\n font-weight: 700;\n margin-left: 13px;\n font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande',\n 'Lucida Sans', Arial, sans-serif;\n margin-right: auto;\n }\n\n b {\n margin-right: 48px;\n color: whitesmoke;\n }\n }\n`;\n\nexport const DelBtnItem = styled.button`\n display: block;\n font-size: 13px;\n font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande',\n 'Lucida Sans', Arial, sans-serif;\n padding: 2px 8px;\n color: white;\n background-color: black;\n border-radius: 13px;\n transition: transform 800ms cubic-bezier(0.4, 0, 0.2, 1);\n\n &:hover {\n background-color: transparent;\n color: buttonborder;\n transform: scale(1.2);\n }\n`;\n","import { HiMicrophone } from 'react-icons/hi';\nimport { useDispatch } from 'react-redux';\nimport { useLocation } from 'react-router-dom';\n// import { Link } from 'react-router-dom';\nimport { fetchDeleteContact } from 'redux/contacts/operations';\nimport { ListItemLink, DelBtnItem, ListItem } from './ContactItem.styled';\n// import { deleteContact } from 'redux/contactsSlice';\n// import { deleteContact } from 'redux/actions';\n\nexport default function ContactItem({ contact }) {\n // const contacts = useSelector(getContacts);\n const { id, name, number } = contact;\n const dispatch = useDispatch();\n const location = useLocation();\n\n const onContactDelete = () => dispatch(fetchDeleteContact(id));\n\n return (\n \n \n \n
    \n {name}\n {number} \n
    \n
    \n \n Delete\n \n
    \n );\n}\n","import styled from 'styled-components';\n\nexport const List = styled.ul`\n width: 666px;\n display: flex;\n flex-direction: column;\n gap: 13px;\n margin: auto;\n font-weight: 500;\n`;\n","import { useSelector } from 'react-redux';\nimport { selectVisibleContacts } from 'redux/contacts/selectors';\nimport ContactItem from 'components/ContactItem/ContactItem';\nimport { List } from './ContactList.styled';\n\nexport default function ContactList() {\n const visibleContacts = useSelector(selectVisibleContacts);\n\n return (\n \n {visibleContacts.map(contact => (\n
  • \n \n
  • \n ))}\n
    \n );\n}\n","import styled from 'styled-components';\n\nexport const Search = styled.div`\n input {\n margin-top: 8px;\n margin-bottom: 22px;\n width: 480px;\n padding: 2px 13px;\n border-radius: 13px;\n text-align: center;\n outline: none;\n }\n\n ::placeholder {\n text-align: center;\n }\n`;\n","import { useDispatch, useSelector } from 'react-redux';\nimport { searchFilter } from 'redux/contacts/filterSlice';\nimport { selectFilter } from 'redux/contacts/selectors';\nimport { Search } from './Filter.styled';\n\nexport default function Filter() {\n const dispatch = useDispatch();\n const filter = useSelector(selectFilter);\n\n const onChangeFilter = newSymbol => {\n dispatch(searchFilter(newSymbol));\n };\n\n return (\n \n onChangeFilter(e.target.value)}\n placeholder=\"Search...\"\n />\n \n );\n}\n","import { styled } from 'styled-components';\n\nexport const ItemsCount = styled.span`\n display: inline-flex;\n justify-content: space-between;\n /* align-items: center; */\n width: 333px;\n margin-bottom: 15px;\n font-size: 18px;\n font-weight: 600;\n font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande',\n 'Lucida Sans', Arial, sans-serif;\n`;\n","import { useSelector } from 'react-redux';\nimport {\n selectTotalContacts,\n selectVisibleContacts,\n} from 'redux/contacts/selectors';\nimport { ItemsCount } from './CountOfContacts.styled';\n\nexport default function CountOfContacts() {\n const visibleContacts = useSelector(selectVisibleContacts);\n const totalContacts = useSelector(selectTotalContacts);\n\n return (\n <>\n \n
    \n Total contacts: {totalContacts}\n
    {' '}\n
    \n Shown contacts:\n {visibleContacts.length}\n
    \n
    \n \n );\n}\n","export default function Message({ message }) {\n return (\n <>\n {message}\n \n );\n}\n","import { createGlobalStyle } from 'styled-components';\nimport contactsImage from '../images/contacts.jpg';\n\nexport const ContactsGlobalStyle = createGlobalStyle`\nbody{\n /* background-image: url('https://bogatyr.club/uploads/posts/2023-03/1679420906_bogatyr-club-p-biblioteka-oboi-foni-pinterest-1.jpg'); */\n\n background-image: url(${contactsImage});\n}`;\n","import { useEffect } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Helmet } from 'react-helmet';\nimport ContactForm from 'components/ContactForm/ContactForm';\nimport ContactList from 'components/ContactList/ContactList';\nimport Filter from 'components/Filter/Filter';\nimport CountOfContacts from 'components/CountOfContacts/CountOfContacts';\nimport Message from 'components/Message/Message';\n\nimport { fetchContacts } from 'redux/contacts/operations';\nimport { selectTotalContacts } from 'redux/contacts/selectors';\nimport { Box } from 'components/GlobalStyle';\nimport { ContactsGlobalStyle } from './Contacts.styled';\nimport { Toaster } from 'react-hot-toast';\n\nexport default function Contacts() {\n const dispatch = useDispatch();\n const contactsLength = useSelector(selectTotalContacts);\n\n useEffect(() => {\n dispatch(fetchContacts());\n }, [dispatch]);\n\n return (\n \n \n\n

    Phonebook

    \n \n

    Contacts

    \n \n \n {contactsLength === 0 ? (\n \n ) : (\n \n )}\n \n \n
    \n );\n}\n","import { createSelector } from '@reduxjs/toolkit';\n\nexport const selectContacts = state => state.contacts.items;\n\nexport const selectTotalContacts = state => state.contacts.items.length;\n\nexport const selectContactsStatus = state => state.contacts.isLoading;\n\nexport const selectContactsError = state => state.contacts.error;\n\nexport const selectFilter = state => state.filter;\n\nexport const selectVisibleContacts = createSelector(\n [selectContacts, selectFilter],\n (contacts, filterField) =>\n contacts.filter(contact =>\n contact.name.toLowerCase().includes(filterField.toLowerCase())\n )\n);\n"],"names":["FormThumb","styled","Form","_templateObject","_taggedTemplateLiteral","formSchema","Yup","shape","name","matches","required","number","ContactForm","dispatch","useDispatch","contacts","useSelector","selectContacts","_jsx","Formik","initialValues","validationSchema","onSubmit","values","actions","enteredName","some","contact","toLowerCase","alert","concat","fetchAddContact","_objectSpread","resetForm","children","_jsxs","Field","placeholder","ErrorMessage","component","type","ListItem","ListItemLink","Link","_templateObject2","DelBtnItem","_templateObject3","ContactItem","_ref","id","location","useLocation","to","state","from","HiMicrophone","size","onClick","fetchDeleteContact","List","ContactList","visibleContacts","selectVisibleContacts","map","Search","Filter","filter","selectFilter","value","onChange","e","newSymbol","target","searchFilter","ItemsCount","CountOfContacts","totalContacts","selectTotalContacts","_Fragment","length","Message","message","ContactsGlobalStyle","createGlobalStyle","contactsImage","Contacts","contactsLength","useEffect","fetchContacts","Box","Helmet","title","Toaster","items","createSelector","filterField","includes"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/545.97fa5c0d.chunk.js b/static/js/545.97fa5c0d.chunk.js new file mode 100644 index 0000000..d372e09 --- /dev/null +++ b/static/js/545.97fa5c0d.chunk.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkreact_homework_template=self.webpackChunkreact_homework_template||[]).push([[545],{3255:function(n,t,e){e.r(t),e.d(t,{default:function(){return _}});var o,r,a,i=e(2791),c=e(4270),s=e(9434),u=e(7689),d=e(5705),l=e(6727),m=e(7425),p=e(3634),b=e(2946),x=e(5218),g=e(1538),f=e(168),h=e(1087),k=e(5867),j=e.p+"static/media/contact_edit.d8226386696e11c1f0c8.jpg",w=(0,k.vJ)(o||(o=(0,f.Z)(["\nbody{\n /* background-image: url('https://kartinki.pics/uploads/posts/2021-07/1625655312_1-kartinkin-com-p-biblioteka-art-art-krasivo-1.jpg'); */\n\n background-image: url(",");\n}\n"])),j),v=(0,k.zo)(d.l0)(r||(r=(0,f.Z)(["\n display: flex;\n flex-direction: column;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 480px;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px 28px;\n margin-bottom: 28px;\n\n button {\n font-weight: bold;\n margin-bottom: 28px;\n padding: 4px 8px;\n border-radius: 22px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n label {\n font-style: oblique;\n font-weight: 500;\n margin-bottom: 13px;\n\n b {\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n color: darkred;\n text-transform: lowercase;\n }\n\n input {\n margin-top: 8px;\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n text-align: center;\n /* background-color: rgba(255, 255, 255, 0); */\n }\n }\n"]))),y=(0,k.zo)(h.rU)(a||(a=(0,f.Z)(["\n display: flex;\n align-items: center;\n justify-content: center;\n text-decoration: none;\n color: midnightblue;\n margin: 22px auto;\n padding: 10px;\n width: 780px;\n height: fit-content;\n border: 4px outset #000;\n border-radius: 13px;\n background-color: rgba(119, 136, 153, 0.8);\n font-size: 22px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 1.02em;\n\n &.active {\n color: midnightblue;\n }\n\n svg {\n width: 32px;\n height: 32px;\n margin-right: 8px;\n }\n\n &:hover,\n &:focus {\n background-color: rgba(119, 136, 153, 0.2);\n }\n /* h3 {\n color: midnightblue;\n border: 4px outset midnightblue;\n background-color: lightgoldenrodyellow;\n max-width: max-content;\n border-radius: 8px;\n padding-left: 8px;\n padding-right: 8px;\n margin: auto;\n margin-bottom: 28px;\n } */\n"]))),A=e(8346),C=e(184),Z=l.Ry().shape({name:l.Z_().matches(/^[a-zA-Za-\u044f\u0410-\u042f]+(([' -][a-zA-Za-\u044f\u0410-\u042f ])?[a-zA-Za-\u044f\u0410-\u042f]*)*$/,"Wrong name format").required("Must be filled"),number:l.Z_().matches(/^\+?\d{1,4}?[-.\s]?\(?\d{1,3}?\)?[-.\s]?\d{1,4}[-.\s]?\d{1,4}[-.\s]?\d{1,9}$/,"Wrong number format").required("Must be filled")});function _(){var n,t,e=(0,s.I0)(),o=(0,u.s0)(),r=(0,u.TH)(),a=(0,i.useRef)(null!==(n=null===(t=r.state)||void 0===t?void 0:t.from)&&void 0!==n?n:"/"),l=(0,u.UO)().contactId,f=(0,s.v9)(b.Af),h=f.find((function(n){return n.id===l})),k={name:h?h.name:"",number:h?h.number:""};return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(y,{to:a.current,children:[(0,C.jsx)(m.sxm,{})," Go back"]}),(0,C.jsxs)(A.x,{children:[(0,C.jsx)(c.q,{title:"Edit contact"}),(0,C.jsx)("h2",{children:"Let's edit your contact"}),(0,C.jsx)(d.J9,{initialValues:k,validationSchema:Z,onSubmit:function(n){var t={name:n.name,number:n.number,contactId:l},r=n.name;if(f.some((function(n){return n.name.toLowerCase()===r.toLowerCase()})))return x.Am.dismiss(g.o),void x.Am.success("Oops! ".concat(r," is already exists!!! Please change it..."),{duration:2e3,position:"top-center"});e((0,p.LG)(t)),x.Am.dismiss(g.o),x.Am.success("Contact of ".concat(t.name," is updated!"),{duration:2e3,position:"top-center"}),setTimeout((function(){o(-1)}),2200)},children:(0,C.jsxs)(v,{children:[(0,C.jsxs)("label",{children:[(0,C.jsx)(d.gN,{type:"text",name:"name",placeholder:"".concat(h.name)}),(0,C.jsx)(d.Bc,{name:"name",component:"b"})]}),(0,C.jsxs)("label",{children:[(0,C.jsx)(d.gN,{type:"tel",name:"number",placeholder:"".concat(h.number)}),(0,C.jsx)(d.Bc,{name:"number",component:"b"})]}),(0,C.jsx)("button",{type:"submit",children:"Confirm changes"})]})}),(0,C.jsx)(x.x7,{}),(0,C.jsx)(w,{})]})]})}},2946:function(n,t,e){e.d(t,{AD:function(){return i},Af:function(){return r},G$:function(){return a},hF:function(){return c}});var o=e(6916),r=function(n){return n.contacts.items},a=function(n){return n.contacts.items.length},i=function(n){return n.filter},c=(0,o.P1)([r,i],(function(n,t){return n.filter((function(n){return n.name.toLowerCase().includes(t.toLowerCase())}))}))}}]); +//# sourceMappingURL=545.97fa5c0d.chunk.js.map \ No newline at end of file diff --git a/static/js/545.97fa5c0d.chunk.js.map b/static/js/545.97fa5c0d.chunk.js.map new file mode 100644 index 0000000..aca88b8 --- /dev/null +++ b/static/js/545.97fa5c0d.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"static/js/545.97fa5c0d.chunk.js","mappings":"oYAKaA,GAAmBC,EAAAA,EAAAA,IAAiBC,IAAAA,GAAAC,EAAAA,EAAAA,GAAA,qMAIrBC,GAIfC,GAAYC,EAAAA,EAAAA,IAAOC,EAAAA,GAAPD,CAAYE,IAAAA,GAAAL,EAAAA,EAAAA,GAAA,g/BAoDxBM,GAAaH,EAAAA,EAAAA,IAAOI,EAAAA,GAAPJ,CAAYK,IAAAA,GAAAR,EAAAA,EAAAA,GAAA,y3B,mBCnDhCS,EAAaC,EAAAA,KAAaC,MAAM,CACpCC,KAAMF,EAAAA,KACHG,QACC,0GACA,q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cuB,SAASD,EAAYtB,cAAc,GAC/D,G","sources":["pages/ContactEdit.styled.js","pages/ContactEdit.jsx","redux/contacts/selectors.js"],"sourcesContent":["import { Form } from 'formik';\nimport { Link } from 'react-router-dom';\nimport { createGlobalStyle, styled } from 'styled-components';\nimport editImage from '../images/contact_edit.jpg';\n\nexport const ContactEditStyle = createGlobalStyle`\nbody{\n /* background-image: url('https://kartinki.pics/uploads/posts/2021-07/1625655312_1-kartinkin-com-p-biblioteka-art-art-krasivo-1.jpg'); */\n\n background-image: url(${editImage});\n}\n`;\n\nexport const FormThumb = styled(Form)`\n display: flex;\n flex-direction: column;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 480px;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px 28px;\n margin-bottom: 28px;\n\n button {\n font-weight: bold;\n margin-bottom: 28px;\n padding: 4px 8px;\n border-radius: 22px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n label {\n font-style: oblique;\n font-weight: 500;\n margin-bottom: 13px;\n\n b {\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n color: darkred;\n text-transform: lowercase;\n }\n\n input {\n margin-top: 8px;\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n text-align: center;\n /* background-color: rgba(255, 255, 255, 0); */\n }\n }\n`;\n\nexport const GoBackLink = styled(Link)`\n display: flex;\n align-items: center;\n justify-content: center;\n text-decoration: none;\n color: midnightblue;\n margin: 22px auto;\n padding: 10px;\n width: 780px;\n height: fit-content;\n border: 4px outset #000;\n border-radius: 13px;\n background-color: rgba(119, 136, 153, 0.8);\n font-size: 22px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 1.02em;\n\n &.active {\n color: midnightblue;\n }\n\n svg {\n width: 32px;\n height: 32px;\n margin-right: 8px;\n }\n\n &:hover,\n &:focus {\n background-color: rgba(119, 136, 153, 0.2);\n }\n /* h3 {\n color: midnightblue;\n border: 4px outset midnightblue;\n background-color: lightgoldenrodyellow;\n max-width: max-content;\n border-radius: 8px;\n padding-left: 8px;\n padding-right: 8px;\n margin: auto;\n margin-bottom: 28px;\n } */\n`;\n","import { useRef } from 'react';\nimport { Helmet } from 'react-helmet';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { useLocation, useNavigate, useParams } from 'react-router-dom';\nimport { ErrorMessage, Field, Formik } from 'formik';\nimport * as Yup from 'yup';\nimport { RiArrowLeftCircleFill } from 'react-icons/ri';\nimport { fetchEditContact } from 'redux/contacts/operations';\nimport { selectContacts } from 'redux/contacts/selectors';\nimport { toast, Toaster } from 'react-hot-toast';\nimport { toastLoading } from 'redux/contacts/contactsSlice';\nimport { ContactEditStyle, FormThumb, GoBackLink } from './ContactEdit.styled';\nimport { Box } from 'components/GlobalStyle';\n\nconst formSchema = Yup.object().shape({\n name: Yup.string()\n .matches(\n /^[a-zA-Za-яА-Я]+(([' -][a-zA-Za-яА-Я ])?[a-zA-Za-яА-Я]*)*$/,\n 'Wrong name format'\n )\n .required('Must be filled'),\n number: Yup.string()\n .matches(\n /^\\+?\\d{1,4}?[-.\\s]?\\(?\\d{1,3}?\\)?[-.\\s]?\\d{1,4}[-.\\s]?\\d{1,4}[-.\\s]?\\d{1,9}$/,\n 'Wrong number format'\n )\n .required('Must be filled'),\n});\n\nexport default function ContactEdit() {\n const dispatch = useDispatch();\n const navigate = useNavigate();\n const location = useLocation();\n const backLocationRef = useRef(location.state?.from ?? '/');\n const { contactId } = useParams();\n const allContacts = useSelector(selectContacts);\n const currentContact = allContacts.find(contact => contact.id === contactId);\n\n const initialValues = {\n name: currentContact ? currentContact.name : '',\n number: currentContact ? currentContact.number : '',\n };\n\n const handleSubmit = values => {\n const updatedContact = {\n name: values.name,\n number: values.number,\n contactId,\n };\n\n const editedName = values.name;\n if (\n allContacts.some(\n contact => contact.name.toLowerCase() === editedName.toLowerCase()\n )\n ) {\n toast.dismiss(toastLoading);\n toast.success(\n `Oops! ${editedName} is already exists!!! Please change it...`,\n {\n duration: 2000,\n position: 'top-center',\n }\n );\n return;\n }\n\n dispatch(fetchEditContact(updatedContact));\n toast.dismiss(toastLoading);\n toast.success(`Contact of ${updatedContact.name} is updated!`, {\n duration: 2000,\n position: 'top-center',\n });\n setTimeout(() => {\n navigate(-1);\n }, 2200);\n };\n\n return (\n <>\n \n Go back\n \n\n \n \n\n

    Let's edit your contact

    \n\n \n \n \n \n \n \n \n \n \n
    \n \n );\n}\n","import { createSelector } from '@reduxjs/toolkit';\n\nexport const selectContacts = state => state.contacts.items;\n\nexport const selectTotalContacts = state => state.contacts.items.length;\n\nexport const selectContactsStatus = state => state.contacts.isLoading;\n\nexport const selectContactsError = state => state.contacts.error;\n\nexport const selectFilter = state => state.filter;\n\nexport const selectVisibleContacts = createSelector(\n [selectContacts, selectFilter],\n (contacts, filterField) =>\n contacts.filter(contact =>\n contact.name.toLowerCase().includes(filterField.toLowerCase())\n )\n);\n"],"names":["ContactEditStyle","createGlobalStyle","_templateObject","_taggedTemplateLiteral","editImage","FormThumb","styled","Form","_templateObject2","GoBackLink","Link","_templateObject3","formSchema","Yup","shape","name","matches","required","number","ContactEdit","_location$state$from","_location$state","dispatch","useDispatch","navigate","useNavigate","location","useLocation","backLocationRef","useRef","state","from","contactId","useParams","allContacts","useSelector","selectContacts","currentContact","find","contact","id","initialValues","_jsxs","_Fragment","children","to","current","_jsx","RiArrowLeftCircleFill","Box","Helmet","title","Formik","validationSchema","onSubmit","values","updatedContact","editedName","some","toLowerCase","toast","toastLoading","concat","duration","position","fetchEditContact","setTimeout","Field","type","placeholder","ErrorMessage","component","Toaster","contacts","items","selectTotalContacts","length","selectFilter","filter","selectVisibleContacts","createSelector","filterField","includes"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/652.ac6426cc.chunk.js.map b/static/js/652.ac6426cc.chunk.js.map deleted file mode 100644 index 5e7e801..0000000 --- a/static/js/652.ac6426cc.chunk.js.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,EAAAA,EAAAA,KAACsB,EAAAA,EAAM,CAACC,MAAM,WAEdvB,EAAAA,EAAAA,KAAA,MAAAS,SAAI,gBACJT,EAAAA,EAAAA,KAAA,MAAAS,SAAI,sCACJT,EAAAA,EAAAA,KAACH,EAAS,KAEVG,EAAAA,EAAAA,KAACkB,EAAgB,MAGvB,C","sources":["components/LoginForm/LoginForm.styled.js","components/LoginForm/LoginForm.jsx","pages/Login.styled.js","pages/Login.jsx"],"sourcesContent":["import { Form } from 'formik';\nimport { styled } from 'styled-components';\n\nexport const FormThumb = styled(Form)`\n display: flex;\n flex-direction: column;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 480px;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px 28px;\n margin-bottom: 28px;\n\n button {\n font-weight: bold;\n margin-bottom: 28px;\n padding: 4px 8px;\n border-radius: 22px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n label {\n font-style: oblique;\n font-weight: 500;\n margin-bottom: 13px;\n\n b {\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n color: darkred;\n text-transform: lowercase;\n }\n\n input {\n margin-top: 8px;\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n text-align: center;\n /* background-color: rgba(255, 255, 255, 0); */\n }\n }\n`;\n","import { ErrorMessage, Field, Formik } from 'formik';\nimport { useDispatch } from 'react-redux';\nimport * as Yup from 'yup';\nimport { logIn } from 'redux/auth/authOperations';\nimport { FormThumb } from './LoginForm.styled';\n\nconst formSchema = Yup.object({\n email: Yup.string().email().required('Must be filled'),\n password: Yup.string().min(8).required('Must be filled'),\n});\n\nexport const LoginForm = () => {\n const dispatch = useDispatch();\n\n const initialValues = { email: '', password: '' };\n\n return (\n {\n dispatch(logIn({ ...values }));\n // actions.resetForm();\n }}\n >\n \n \n \n \n \n \n );\n};\n","import { createGlobalStyle } from 'styled-components';\n\nexport const LoginGlobalStyle = createGlobalStyle`\nbody{\n background-image: url('https://kartinki.pics/uploads/posts/2021-07/1625655405_50-kartinkin-com-p-biblioteka-art-art-krasivo-55.jpg');\n}`;\n","import { Helmet } from 'react-helmet';\nimport { LoginForm } from 'components/LoginForm/LoginForm';\nimport { LoginGlobalStyle } from './Login.styled';\nimport { Box } from 'components/GlobalStyle';\n\nexport default function Login() {\n return (\n \n \n\n

    Login Form

    \n
    Please sign up and let's work!!!
    \n \n\n \n
    \n );\n}\n"],"names":["FormThumb","styled","Form","_templateObject","_taggedTemplateLiteral","formSchema","Yup","email","required","password","min","LoginForm","dispatch","useDispatch","_jsx","Formik","initialValues","validationSchema","onSubmit","values","actions","logIn","_objectSpread","children","_jsxs","autoComplete","Field","type","name","placeholder","ErrorMessage","component","LoginGlobalStyle","createGlobalStyle","Login","Box","Helmet","title"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/795.8a31e02f.chunk.js b/static/js/795.8a31e02f.chunk.js new file mode 100644 index 0000000..22bd483 --- /dev/null +++ b/static/js/795.8a31e02f.chunk.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkreact_homework_template=self.webpackChunkreact_homework_template||[]).push([[795],{6063:function(e,n,t){t.r(n),t.d(n,{default:function(){return l}});var r,o=t(8346),a=t(4270),c=t(168),i=t(5867),s=t.p+"static/media/not_found.63fa34bd2872f402dc85.jpg",d=(0,i.vJ)(r||(r=(0,c.Z)(["\nbody{\n background-image: url(",");\n}\n"])),s),u=t(184);function l(){return(0,u.jsxs)("main",{children:[(0,u.jsx)(a.q,{title:"Not Found..."}),(0,u.jsxs)(o.x,{children:[(0,u.jsx)("h1",{style:{fontSize:120},children:"404"}),(0,u.jsx)("b",{style:{fontSize:28},children:"Sorry, we couldn't find that page..."})]}),(0,u.jsx)(d,{})]})}}}]); +//# sourceMappingURL=795.8a31e02f.chunk.js.map \ No newline at end of file diff --git a/static/js/795.8a31e02f.chunk.js.map b/static/js/795.8a31e02f.chunk.js.map new file mode 100644 index 0000000..35b63d1 --- /dev/null +++ b/static/js/795.8a31e02f.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"static/js/795.8a31e02f.chunk.js","mappings":"yRAGaA,GAAsBC,EAAAA,EAAAA,IAAiBC,IAAAA,GAAAC,EAAAA,EAAAA,GAAA,oDAExBC,G,SCDb,SAASC,IACtB,OACEC,EAAAA,EAAAA,MAAA,QAAAC,SAAA,EACEC,EAAAA,EAAAA,KAACC,EAAAA,EAAM,CAACC,MAAM,kBACdJ,EAAAA,EAAAA,MAACK,EAAAA,EAAG,CAAAJ,SAAA,EACFC,EAAAA,EAAAA,KAAA,MAAII,MAAO,CAAEC,SAAU,KAAMN,SAAC,SAC9BC,EAAAA,EAAAA,KAAA,KAAGI,MAAO,CAAEC,SAAU,IAAKN,SAAC,6CAE9BC,EAAAA,EAAAA,KAACR,EAAmB,MAG1B,C","sources":["pages/NotFoundPage.styled.js","pages/NotFoundPage.jsx"],"sourcesContent":["import { createGlobalStyle } from 'styled-components';\nimport notFoundImage from '../images/not_found.jpg';\n\nexport const NotFoundGlobalStyle = createGlobalStyle`\nbody{\n background-image: url(${notFoundImage});\n}\n`;\n","import { Box } from 'components/GlobalStyle';\nimport { Helmet } from 'react-helmet';\nimport { NotFoundGlobalStyle } from './NotFoundPage.styled';\n\nexport default function NotFound() {\n return (\n
    \n \n \n

    404

    \n Sorry, we couldn't find that page...\n
    \n \n
    \n );\n}\n"],"names":["NotFoundGlobalStyle","createGlobalStyle","_templateObject","_taggedTemplateLiteral","notFoundImage","NotFound","_jsxs","children","_jsx","Helmet","title","Box","style","fontSize"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/868.1bfd541e.chunk.js b/static/js/868.1bfd541e.chunk.js deleted file mode 100644 index 999d0db..0000000 --- a/static/js/868.1bfd541e.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";(self.webpackChunkreact_homework_template=self.webpackChunkreact_homework_template||[]).push([[868],{3868:function(n,t,e){e.r(t),e.d(t,{default:function(){return Z}});var o,r,a,i=e(2791),c=e(4270),s=e(9434),u=e(7689),d=e(5705),l=e(6727),m=e(7425),p=e(3634),x=e(2946),b=e(5218),g=e(1538),f=e(168),h=e(1087),k=e(5867),w=(0,k.vJ)(o||(o=(0,f.Z)(["\nbody{\n background-image: url('https://kartinki.pics/uploads/posts/2021-07/1625655312_1-kartinkin-com-p-biblioteka-art-art-krasivo-1.jpg');\n}\n"]))),j=(0,k.zo)(d.l0)(r||(r=(0,f.Z)(["\n display: flex;\n flex-direction: column;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 480px;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px 28px;\n margin-bottom: 28px;\n\n button {\n font-weight: bold;\n margin-bottom: 28px;\n padding: 4px 8px;\n border-radius: 22px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n label {\n font-style: oblique;\n font-weight: 500;\n margin-bottom: 13px;\n\n b {\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n color: darkred;\n text-transform: lowercase;\n }\n\n input {\n margin-top: 8px;\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n text-align: center;\n /* background-color: rgba(255, 255, 255, 0); */\n }\n }\n"]))),v=(0,k.zo)(h.rU)(a||(a=(0,f.Z)(["\n display: flex;\n align-items: center;\n justify-content: center;\n text-decoration: none;\n color: midnightblue;\n margin: 22px auto;\n padding: 10px;\n width: 780px;\n height: fit-content;\n border: 4px outset #000;\n border-radius: 13px;\n background-color: rgba(119, 136, 153, 0.8);\n font-size: 22px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 1.02em;\n\n &.active {\n color: midnightblue;\n }\n\n svg {\n width: 32px;\n height: 32px;\n margin-right: 8px;\n }\n\n &:hover,\n &:focus {\n background-color: rgba(119, 136, 153, 0.2);\n }\n /* h3 {\n color: midnightblue;\n border: 4px outset midnightblue;\n background-color: lightgoldenrodyellow;\n max-width: max-content;\n border-radius: 8px;\n padding-left: 8px;\n padding-right: 8px;\n margin: auto;\n margin-bottom: 28px;\n } */\n"]))),y=e(8346),A=e(184),C=l.Ry().shape({name:l.Z_().matches(/^[a-zA-Za-\u044f\u0410-\u042f]+(([' -][a-zA-Za-\u044f\u0410-\u042f ])?[a-zA-Za-\u044f\u0410-\u042f]*)*$/,"Wrong name format").required("Must be filled"),number:l.Z_().matches(/^\+?\d{1,4}?[-.\s]?\(?\d{1,3}?\)?[-.\s]?\d{1,4}[-.\s]?\d{1,4}[-.\s]?\d{1,9}$/,"Wrong number format").required("Must be filled")});function Z(){var n,t,e=(0,s.I0)(),o=(0,u.s0)(),r=(0,u.TH)(),a=(0,i.useRef)(null!==(n=null===(t=r.state)||void 0===t?void 0:t.from)&&void 0!==n?n:"/"),l=(0,u.UO)().contactId,f=(0,s.v9)(x.Af),h=f.find((function(n){return n.id===l})),k={name:h?h.name:"",number:h?h.number:""};return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(v,{to:a.current,children:[(0,A.jsx)(m.sxm,{})," Go back"]}),(0,A.jsxs)(y.x,{children:[(0,A.jsx)(c.q,{title:"Edit contact"}),(0,A.jsx)("h2",{children:"Let's edit your contact"}),(0,A.jsx)(d.J9,{initialValues:k,validationSchema:C,onSubmit:function(n){var t={name:n.name,number:n.number,contactId:l},r=n.name;if(f.some((function(n){return n.name.toLowerCase()===r.toLowerCase()})))return b.Am.dismiss(g.o),void b.Am.success("Oops! ".concat(r," is already exists!!! Please change it..."),{duration:2e3,position:"top-center"});e((0,p.LG)(t)),b.Am.dismiss(g.o),b.Am.success("Contact of ".concat(t.name," is updated!"),{duration:2e3,position:"top-center"}),setTimeout((function(){o(-1)}),2200)},children:(0,A.jsxs)(j,{children:[(0,A.jsxs)("label",{children:[(0,A.jsx)(d.gN,{type:"text",name:"name",placeholder:"".concat(h.name)}),(0,A.jsx)(d.Bc,{name:"name",component:"b"})]}),(0,A.jsxs)("label",{children:[(0,A.jsx)(d.gN,{type:"tel",name:"number",placeholder:"".concat(h.number)}),(0,A.jsx)(d.Bc,{name:"number",component:"b"})]}),(0,A.jsx)("button",{type:"submit",children:"Confirm changes"})]})}),(0,A.jsx)(b.x7,{}),(0,A.jsx)(w,{})]})]})}},2946:function(n,t,e){e.d(t,{AD:function(){return i},Af:function(){return r},G$:function(){return a},hF:function(){return c}});var o=e(6916),r=function(n){return n.contacts.items},a=function(n){return n.contacts.items.length},i=function(n){return n.filter},c=(0,o.P1)([r,i],(function(n,t){return n.filter((function(n){return n.name.toLowerCase().includes(t.toLowerCase())}))}))}}]); -//# sourceMappingURL=868.1bfd541e.chunk.js.map \ No newline at end of file diff --git a/static/js/868.1bfd541e.chunk.js.map b/static/js/868.1bfd541e.chunk.js.map deleted file mode 100644 index ef2808a..0000000 --- a/static/js/868.1bfd541e.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/js/868.1bfd541e.chunk.js","mappings":"yUAIaA,GAAmBC,EAAAA,EAAAA,IAAiBC,IAAAA,GAAAC,EAAAA,EAAAA,GAAA,6JAMpCC,GAAYC,EAAAA,EAAAA,IAAOC,EAAAA,GAAPD,CAAYE,IAAAA,GAAAJ,EAAAA,EAAAA,GAAA,g/BAoDxBK,GAAaH,EAAAA,EAAAA,IAAOI,EAAAA,GAAPJ,CAAYK,IAAAA,GAAAP,EAAAA,EAAAA,GAAA,y3B,mBChDhCQ,EAAaC,EAAAA,KAAaC,MAAM,CACpCC,KAAMF,EAAAA,KACHG,QACC,0GACA,qBAEDC,SAAS,kBACZC,OAAQL,EAAAA,KACLG,QACC,+EACA,uBAEDC,SAAS,oBAGC,SAASE,IAAe,IAADC,EAAAC,EAC9BC,GAAWC,EAAAA,EAAAA,MACXC,GAAWC,EAAAA,EAAAA,MACXC,GAAWC,EAAAA,EAAAA,MACXC,GAAkBC,EAAAA,EAAAA,QAA2B,QAArBT,EAAe,QAAfC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YAAW,WACT1C,GAAU,EACZ,GAAG,KACL,EAgB+BoB,UAEvBF,EAAAA,EAAAA,MAACrC,EAAS,CAAAuC,SAAA,EACRF,EAAAA,EAAAA,MAAA,SAAAE,SAAA,EACEG,EAAAA,EAAAA,KAACoB,EAAAA,GAAK,CACJC,KAAK,OACLrD,KAAK,OACLsD,YAAW,GAAAP,OAAKzB,EAAetB,SAEjCgC,EAAAA,EAAAA,KAACuB,EAAAA,GAAY,CAACvD,KAAK,OAAOwD,UAAU,UAEtC7B,EAAAA,EAAAA,MAAA,SAAAE,SAAA,EACEG,EAAAA,EAAAA,KAACoB,EAAAA,GAAK,CACJC,KAAK,MACLrD,KAAK,SACLsD,YAAW,GAAAP,OAAKzB,EAAenB,WAEjC6B,EAAAA,EAAAA,KAACuB,EAAAA,GAAY,CAACvD,KAAK,SAASwD,UAAU,UAExCxB,EAAAA,EAAAA,KAAA,UAAQqB,KAAK,SAAQxB,SAAC,0BAG1BG,EAAAA,EAAAA,KAACyB,EAAAA,GAAO,KACRzB,EAAAA,EAAAA,KAAC9C,EAAgB,SAIzB,C,8ICrHamC,EAAiB,SAAAN,GAAK,OAAIA,EAAM2C,SAASC,KAAM,EAE/CC,EAAsB,SAAA7C,GAAK,OAAIA,EAAM2C,SAASC,MAAME,MAAO,EAM3DC,EAAe,SAAA/C,GAAK,OAAIA,EAAMgD,MAAO,EAErCC,GAAwBC,EAAAA,EAAAA,IACnC,CAAC5C,EAAgByC,IACjB,SAACJ,EAAUQ,GAAW,OACpBR,EAASK,QAAO,SAAAvC,GAAO,OACrBA,EAAQxB,KAAK4C,cAAcuB,SAASD,EAAYtB,cAAc,GAC/D,G","sources":["pages/ContactEdit.styled.js","pages/ContactEdit.jsx","redux/contacts/selectors.js"],"sourcesContent":["import { Form } from 'formik';\nimport { Link } from 'react-router-dom';\nimport { createGlobalStyle, styled } from 'styled-components';\n\nexport const ContactEditStyle = createGlobalStyle`\nbody{\n background-image: url('https://kartinki.pics/uploads/posts/2021-07/1625655312_1-kartinkin-com-p-biblioteka-art-art-krasivo-1.jpg');\n}\n`;\n\nexport const FormThumb = styled(Form)`\n display: flex;\n flex-direction: column;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 480px;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px 28px;\n margin-bottom: 28px;\n\n button {\n font-weight: bold;\n margin-bottom: 28px;\n padding: 4px 8px;\n border-radius: 22px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n label {\n font-style: oblique;\n font-weight: 500;\n margin-bottom: 13px;\n\n b {\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n color: darkred;\n text-transform: lowercase;\n }\n\n input {\n margin-top: 8px;\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n text-align: center;\n /* background-color: rgba(255, 255, 255, 0); */\n }\n }\n`;\n\nexport const GoBackLink = styled(Link)`\n display: flex;\n align-items: center;\n justify-content: center;\n text-decoration: none;\n color: midnightblue;\n margin: 22px auto;\n padding: 10px;\n width: 780px;\n height: fit-content;\n border: 4px outset #000;\n border-radius: 13px;\n background-color: rgba(119, 136, 153, 0.8);\n font-size: 22px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 1.02em;\n\n &.active {\n color: midnightblue;\n }\n\n svg {\n width: 32px;\n height: 32px;\n margin-right: 8px;\n }\n\n &:hover,\n &:focus {\n background-color: rgba(119, 136, 153, 0.2);\n }\n /* h3 {\n color: midnightblue;\n border: 4px outset midnightblue;\n background-color: lightgoldenrodyellow;\n max-width: max-content;\n border-radius: 8px;\n padding-left: 8px;\n padding-right: 8px;\n margin: auto;\n margin-bottom: 28px;\n } */\n`;\n","import { useRef } from 'react';\nimport { Helmet } from 'react-helmet';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { useLocation, useNavigate, useParams } from 'react-router-dom';\nimport { ErrorMessage, Field, Formik } from 'formik';\nimport * as Yup from 'yup';\nimport { RiArrowLeftCircleFill } from 'react-icons/ri';\nimport { fetchEditContact } from 'redux/contacts/operations';\nimport { selectContacts } from 'redux/contacts/selectors';\nimport { toast, Toaster } from 'react-hot-toast';\nimport { toastLoading } from 'redux/contacts/contactsSlice';\nimport { ContactEditStyle, FormThumb, GoBackLink } from './ContactEdit.styled';\nimport { Box } from 'components/GlobalStyle';\n\nconst formSchema = Yup.object().shape({\n name: Yup.string()\n .matches(\n /^[a-zA-Za-яА-Я]+(([' -][a-zA-Za-яА-Я ])?[a-zA-Za-яА-Я]*)*$/,\n 'Wrong name format'\n )\n .required('Must be filled'),\n number: Yup.string()\n .matches(\n /^\\+?\\d{1,4}?[-.\\s]?\\(?\\d{1,3}?\\)?[-.\\s]?\\d{1,4}[-.\\s]?\\d{1,4}[-.\\s]?\\d{1,9}$/,\n 'Wrong number format'\n )\n .required('Must be filled'),\n});\n\nexport default function ContactEdit() {\n const dispatch = useDispatch();\n const navigate = useNavigate();\n const location = useLocation();\n const backLocationRef = useRef(location.state?.from ?? '/');\n const { contactId } = useParams();\n const allContacts = useSelector(selectContacts);\n const currentContact = allContacts.find(contact => contact.id === contactId);\n\n const initialValues = {\n name: currentContact ? currentContact.name : '',\n number: currentContact ? currentContact.number : '',\n };\n\n const handleSubmit = values => {\n const updatedContact = {\n name: values.name,\n number: values.number,\n contactId,\n };\n\n const editedName = values.name;\n if (\n allContacts.some(\n contact => contact.name.toLowerCase() === editedName.toLowerCase()\n )\n ) {\n toast.dismiss(toastLoading);\n toast.success(\n `Oops! ${editedName} is already exists!!! Please change it...`,\n {\n duration: 2000,\n position: 'top-center',\n }\n );\n return;\n }\n\n dispatch(fetchEditContact(updatedContact));\n toast.dismiss(toastLoading);\n toast.success(`Contact of ${updatedContact.name} is updated!`, {\n duration: 2000,\n position: 'top-center',\n });\n setTimeout(() => {\n navigate(-1);\n }, 2200);\n };\n\n return (\n <>\n \n Go back\n \n\n \n \n\n

    Let's edit your contact

    \n\n \n \n \n \n \n \n \n \n \n
    \n \n );\n}\n","import { createSelector } from '@reduxjs/toolkit';\n\nexport const selectContacts = state => state.contacts.items;\n\nexport const selectTotalContacts = state => state.contacts.items.length;\n\nexport const selectContactsStatus = state => state.contacts.isLoading;\n\nexport const selectContactsError = state => state.contacts.error;\n\nexport const selectFilter = state => state.filter;\n\nexport const selectVisibleContacts = createSelector(\n [selectContacts, selectFilter],\n (contacts, filterField) =>\n contacts.filter(contact =>\n contact.name.toLowerCase().includes(filterField.toLowerCase())\n )\n);\n"],"names":["ContactEditStyle","createGlobalStyle","_templateObject","_taggedTemplateLiteral","FormThumb","styled","Form","_templateObject2","GoBackLink","Link","_templateObject3","formSchema","Yup","shape","name","matches","required","number","ContactEdit","_location$state$from","_location$state","dispatch","useDispatch","navigate","useNavigate","location","useLocation","backLocationRef","useRef","state","from","contactId","useParams","allContacts","useSelector","selectContacts","currentContact","find","contact","id","initialValues","_jsxs","_Fragment","children","to","current","_jsx","RiArrowLeftCircleFill","Box","Helmet","title","Formik","validationSchema","onSubmit","values","updatedContact","editedName","some","toLowerCase","toast","toastLoading","concat","duration","position","fetchEditContact","setTimeout","Field","type","placeholder","ErrorMessage","component","Toaster","contacts","items","selectTotalContacts","length","selectFilter","filter","selectVisibleContacts","createSelector","filterField","includes"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/899.ce56b1d1.chunk.js.map b/static/js/899.ce56b1d1.chunk.js.map deleted file mode 100644 index 90c9e72..0000000 --- a/static/js/899.ce56b1d1.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/js/899.ce56b1d1.chunk.js","mappings":"6RAGaA,GAAYC,EAAAA,EAAAA,IAAOC,EAAAA,GAAPD,CAAYE,IAAAA,GAAAC,EAAAA,EAAAA,GAAA,8sC,SCI/BC,EAAaC,EAAAA,KAAaC,MAAM,CACpCC,KAAMF,EAAAA,KACHG,QACC,0GACA,qBAEDC,SAAS,kBACZC,OAAQL,EAAAA,KACLG,QACC,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AG,CAAAtD,SAAA,EACFhB,EAAAA,EAAAA,KAACuE,EAAAA,EAAM,CAACC,MAAM,mBAEdxE,EAAAA,EAAAA,KAAA,MAAAgB,SAAI,eACJhB,EAAAA,EAAAA,KAACN,EAAW,KACZM,EAAAA,EAAAA,KAAA,MAAAgB,SAAI,cACJhB,EAAAA,EAAAA,KAACyD,EAAe,KAChBzD,EAAAA,EAAAA,KAAC+C,EAAM,IACa,IAAnBoB,GACCnE,EAAAA,EAAAA,KAAC8D,EAAO,CAACC,QAAQ,sCAEjB/D,EAAAA,EAAAA,KAAC0C,EAAW,KAEd1C,EAAAA,EAAAA,KAACgE,EAAmB,KACpBhE,EAAAA,EAAAA,KAACyE,EAAAA,GAAO,MAGd,C,8ICvCa1E,EAAiB,SAAAoC,GAAK,OAAIA,EAAMtC,SAAS6E,KAAM,EAE/Cf,EAAsB,SAAAxB,GAAK,OAAIA,EAAMtC,SAAS6E,MAAMb,MAAO,EAM3DZ,EAAe,SAAAd,GAAK,OAAIA,EAAMa,MAAO,EAErCJ,GAAwB+B,EAAAA,EAAAA,IACnC,CAAC5E,EAAgBkD,IACjB,SAACpD,EAAU+E,GAAW,OACpB/E,EAASmD,QAAO,SAAAvC,GAAO,OACrBA,EAAQnB,KAAKoB,cAAcmE,SAASD,EAAYlE,cAAc,GAC/D,G","sources":["components/ContactForm/ContactForm.styled.js","components/ContactForm/ContactForm.jsx","components/ContactItem/ContactItem.styled.js","components/ContactItem/ContactItem.jsx","components/ContactList/ContactList.styled.js","components/ContactList/ContactList.jsx","components/Filter/Filter.styled.js","components/Filter/Filter.jsx","components/CountOfContacts/CountOfContacts.styled.js","components/CountOfContacts/CountOfContacts.jsx","components/Message/Message.jsx","pages/Contacts.styled.js","pages/Contacts.jsx","redux/contacts/selectors.js"],"sourcesContent":["import { Form } from 'formik';\nimport styled from 'styled-components';\n\nexport const FormThumb = styled(Form)`\n display: flex;\n flex-direction: column;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 480px;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px 28px;\n margin-bottom: 28px;\n\n /* transform: scale(0.5);\n opacity: 0.3;\n transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1),\n opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);\n\n &:hover {\n transform: scale(1);\n opacity: 1;\n } */\n\n button {\n font-weight: bold;\n margin-bottom: 28px;\n padding: 4px 8px;\n border-radius: 22px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n label {\n font-style: oblique;\n font-weight: 500;\n margin-bottom: 13px;\n\n b {\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n color: darkred;\n text-transform: lowercase;\n }\n\n input {\n margin-top: 8px;\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n text-align: center;\n /* background-color: rgba(255, 255, 255, 0); */\n }\n }\n`;\n","import { Formik, Field, ErrorMessage } from 'formik';\nimport * as Yup from 'yup';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { selectContacts } from 'redux/contacts/selectors';\nimport { fetchAddContact } from 'redux/contacts/operations';\nimport { FormThumb } from './ContactForm.styled';\n\nconst formSchema = Yup.object().shape({\n name: Yup.string()\n .matches(\n /^[a-zA-Za-яА-Я]+(([' -][a-zA-Za-яА-Я ])?[a-zA-Za-яА-Я]*)*$/,\n 'Wrong name format'\n )\n .required('Must be filled'),\n number: Yup.string()\n .matches(\n /^\\+?\\d{1,4}?[-.\\s]?\\(?\\d{1,3}?\\)?[-.\\s]?\\d{1,4}[-.\\s]?\\d{1,4}[-.\\s]?\\d{1,9}$/,\n 'Wrong number format'\n )\n .required('Must be filled'),\n});\n\nexport default function ContactForm() {\n const dispatch = useDispatch();\n const contacts = useSelector(selectContacts);\n\n const initialValues = { name: '', number: '' };\n\n return (\n {\n const enteredName = values.name;\n\n if (\n contacts.some(\n contact => contact.name.toLowerCase() === enteredName.toLowerCase()\n )\n ) {\n alert(`${enteredName} is already in contacts.`);\n return;\n }\n\n dispatch(fetchAddContact({ ...values }));\n actions.resetForm();\n }}\n >\n \n \n\n \n\n \n \n \n );\n}\n","import { Link } from 'react-router-dom';\nimport { styled } from 'styled-components';\n\nexport const ListItem = styled.div`\n display: flex;\n align-items: center;\n color: black;\n border: 2px outset darkgrey;\n padding: 2px;\n border-radius: 18px;\n cursor: pointer;\n transition: transform 800ms cubic-bezier(0.4, 0, 0.2, 1);\n\n &:hover {\n transform: scale(1.1);\n }\n`;\n\nexport const ListItemLink = styled(Link)`\n display: flex;\n width: 100%;\n color: black;\n text-decoration: none;\n\n &:visited {\n color: black;\n }\n\n div {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n\n span {\n display: inline-block;\n font-size: 18px;\n font-weight: 700;\n margin-left: 13px;\n font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande',\n 'Lucida Sans', Arial, sans-serif;\n margin-right: auto;\n }\n\n b {\n margin-right: 48px;\n color: whitesmoke;\n }\n }\n`;\n\nexport const DelBtnItem = styled.button`\n display: block;\n font-size: 13px;\n font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande',\n 'Lucida Sans', Arial, sans-serif;\n padding: 2px 8px;\n color: white;\n background-color: black;\n border-radius: 13px;\n transition: transform 800ms cubic-bezier(0.4, 0, 0.2, 1);\n\n &:hover {\n background-color: transparent;\n color: buttonborder;\n transform: scale(1.2);\n }\n`;\n","import { HiMicrophone } from 'react-icons/hi';\nimport { useDispatch } from 'react-redux';\nimport { useLocation } from 'react-router-dom';\n// import { Link } from 'react-router-dom';\nimport { fetchDeleteContact } from 'redux/contacts/operations';\nimport { ListItemLink, DelBtnItem, ListItem } from './ContactItem.styled';\n// import { deleteContact } from 'redux/contactsSlice';\n// import { deleteContact } from 'redux/actions';\n\nexport default function ContactItem({ contact }) {\n // const contacts = useSelector(getContacts);\n const { id, name, number } = contact;\n const dispatch = useDispatch();\n const location = useLocation();\n\n const onContactDelete = () => dispatch(fetchDeleteContact(id));\n\n return (\n \n \n \n
    \n {name}\n {number} \n
    \n
    \n \n Delete\n \n
    \n );\n}\n","import styled from 'styled-components';\n\nexport const List = styled.ul`\n width: 666px;\n display: flex;\n flex-direction: column;\n gap: 13px;\n margin: auto;\n font-weight: 500;\n`;\n","import { useSelector } from 'react-redux';\nimport { selectVisibleContacts } from 'redux/contacts/selectors';\nimport ContactItem from 'components/ContactItem/ContactItem';\nimport { List } from './ContactList.styled';\n\nexport default function ContactList() {\n const visibleContacts = useSelector(selectVisibleContacts);\n\n return (\n \n {visibleContacts.map(contact => (\n
  • \n \n
  • \n ))}\n
    \n );\n}\n","import styled from 'styled-components';\n\nexport const Search = styled.div`\n input {\n margin-top: 8px;\n margin-bottom: 22px;\n width: 480px;\n padding: 2px 13px;\n border-radius: 13px;\n text-align: center;\n outline: none;\n }\n\n ::placeholder {\n text-align: center;\n }\n`;\n","import { useDispatch, useSelector } from 'react-redux';\nimport { searchFilter } from 'redux/contacts/filterSlice';\nimport { selectFilter } from 'redux/contacts/selectors';\nimport { Search } from './Filter.styled';\n\nexport default function Filter() {\n const dispatch = useDispatch();\n const filter = useSelector(selectFilter);\n\n const onChangeFilter = newSymbol => {\n dispatch(searchFilter(newSymbol));\n };\n\n return (\n \n onChangeFilter(e.target.value)}\n placeholder=\"Search...\"\n />\n \n );\n}\n","import { styled } from 'styled-components';\n\nexport const ItemsCount = styled.span`\n display: inline-flex;\n justify-content: space-between;\n /* align-items: center; */\n width: 333px;\n margin-bottom: 15px;\n font-size: 18px;\n font-weight: 600;\n font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande',\n 'Lucida Sans', Arial, sans-serif;\n`;\n","import { useSelector } from 'react-redux';\nimport {\n selectTotalContacts,\n selectVisibleContacts,\n} from 'redux/contacts/selectors';\nimport { ItemsCount } from './CountOfContacts.styled';\n\nexport default function CountOfContacts() {\n const visibleContacts = useSelector(selectVisibleContacts);\n const totalContacts = useSelector(selectTotalContacts);\n\n return (\n <>\n \n
    \n Total contacts: {totalContacts}\n
    {' '}\n
    \n Shown contacts:\n {visibleContacts.length}\n
    \n
    \n \n );\n}\n","export default function Message({ message }) {\n return (\n <>\n {message}\n \n );\n}\n","import { createGlobalStyle } from 'styled-components';\n\nexport const ContactsGlobalStyle = createGlobalStyle`\nbody{\n background-image: url('https://bogatyr.club/uploads/posts/2023-03/1679420906_bogatyr-club-p-biblioteka-oboi-foni-pinterest-1.jpg');\n}`;\n","import { useEffect } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Helmet } from 'react-helmet';\nimport ContactForm from 'components/ContactForm/ContactForm';\nimport ContactList from 'components/ContactList/ContactList';\nimport Filter from 'components/Filter/Filter';\nimport CountOfContacts from 'components/CountOfContacts/CountOfContacts';\nimport Message from 'components/Message/Message';\n\nimport { fetchContacts } from 'redux/contacts/operations';\nimport { selectTotalContacts } from 'redux/contacts/selectors';\nimport { Box } from 'components/GlobalStyle';\nimport { ContactsGlobalStyle } from './Contacts.styled';\nimport { Toaster } from 'react-hot-toast';\n\nexport default function Contacts() {\n const dispatch = useDispatch();\n const contactsLength = useSelector(selectTotalContacts);\n\n useEffect(() => {\n dispatch(fetchContacts());\n }, [dispatch]);\n\n return (\n \n \n\n

    Phonebook

    \n \n

    Contacts

    \n \n \n {contactsLength === 0 ? (\n \n ) : (\n \n )}\n \n \n
    \n );\n}\n","import { createSelector } from '@reduxjs/toolkit';\n\nexport const selectContacts = state => state.contacts.items;\n\nexport const selectTotalContacts = state => state.contacts.items.length;\n\nexport const selectContactsStatus = state => state.contacts.isLoading;\n\nexport const selectContactsError = state => state.contacts.error;\n\nexport const selectFilter = state => state.filter;\n\nexport const selectVisibleContacts = createSelector(\n [selectContacts, selectFilter],\n (contacts, filterField) =>\n contacts.filter(contact =>\n contact.name.toLowerCase().includes(filterField.toLowerCase())\n )\n);\n"],"names":["FormThumb","styled","Form","_templateObject","_taggedTemplateLiteral","formSchema","Yup","shape","name","matches","required","number","ContactForm","dispatch","useDispatch","contacts","useSelector","selectContacts","_jsx","Formik","initialValues","validationSchema","onSubmit","values","actions","enteredName","some","contact","toLowerCase","alert","concat","fetchAddContact","_objectSpread","resetForm","children","_jsxs","Field","placeholder","ErrorMessage","component","type","ListItem","ListItemLink","Link","_templateObject2","DelBtnItem","_templateObject3","ContactItem","_ref","id","location","useLocation","to","state","from","HiMicrophone","size","onClick","fetchDeleteContact","List","ContactList","visibleContacts","selectVisibleContacts","map","Search","Filter","filter","selectFilter","value","onChange","e","newSymbol","target","searchFilter","ItemsCount","CountOfContacts","totalContacts","selectTotalContacts","_Fragment","length","Message","message","ContactsGlobalStyle","createGlobalStyle","Contacts","contactsLength","useEffect","fetchContacts","Box","Helmet","title","Toaster","items","createSelector","filterField","includes"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/905.233b722d.chunk.js b/static/js/905.233b722d.chunk.js deleted file mode 100644 index 959f9bd..0000000 --- a/static/js/905.233b722d.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";(self.webpackChunkreact_homework_template=self.webpackChunkreact_homework_template||[]).push([[905,452],{8425:function(n,e,t){t.r(e),t.d(e,{default:function(){return x}});var r,o=t(4270),a=t(4452),i=t(6340),s=t(8346),l=t(168),d=t(5867),c=t.p+"static/media/home.af12a45630dd0e647adb.jpg",p=(0,d.vJ)(r||(r=(0,l.Z)(["\nbody{\n /* background-image: url('https://kartinki.pics/uploads/posts/2021-07/1625655366_42-kartinkin-com-p-biblioteka-art-art-krasivo-47.jpg'); */\n\n background-image: url(",");\n}\n\nsvg{\n width: 220px;\n height: 220px;\n color: midnightblue;\n}\n"])),c),u=t(8014),m=t(184);function x(){var n=(0,i.a)().isLoggedIn;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(o.q,{title:"Phonebook"}),n?(0,m.jsxs)(s.x,{children:[(0,m.jsx)("h1",{style:{fontSize:44},children:"WELCOME !!!"}),(0,m.jsx)("b",{style:{display:"inline-block",fontSize:22,marginBottom:"13px",textTransform:"uppercase"},children:"It's your"}),(0,m.jsx)("h2",{style:{fontSize:44},children:"Phonebook Organizer"}),(0,m.jsx)(u.xqN,{}),(0,m.jsx)(p,{})]}):(0,m.jsx)(a.default,{})]})}},4452:function(n,e,t){t.r(e),t.d(e,{default:function(){return k}});var r,o,a=t(4270),i=t(1413),s=t(5705),l=t(6727),d=t(9434),c=t(5822),p=t(168),u=t(5867),m=(0,u.zo)(s.l0)(r||(r=(0,p.Z)(["\n display: flex;\n flex-direction: column;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 480px;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px 28px;\n margin-bottom: 28px;\n\n button {\n font-weight: bold;\n margin-bottom: 28px;\n padding: 4px 8px;\n border-radius: 22px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n label {\n font-style: oblique;\n font-weight: 500;\n margin-bottom: 13px;\n\n b {\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n color: darkred;\n text-transform: lowercase;\n }\n\n input {\n margin-top: 8px;\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n text-align: center;\n /* background-color: rgba(255, 255, 255, 0); */\n }\n }\n"]))),x=t(1087),b=t(184),g=l.Ry({name:l.Z_().required("Must be filled"),email:l.Z_().email().required("Must be filled"),password:l.Z_().min(8).required("Must be filled")});function h(){var n=(0,d.I0)();return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h2",{children:"Registration Form"}),(0,b.jsxs)("h5",{children:["Have an account already? ",(0,b.jsx)(x.rU,{to:"/login",children:"Sign Up"})," please!"]}),(0,b.jsx)(s.J9,{initialValues:{name:"",email:"",password:""},validationSchema:g,onSubmit:function(e,t){n((0,c.z2)((0,i.Z)({},e)))},children:(0,b.jsxs)(m,{autoComplete:"off",children:[(0,b.jsxs)("label",{children:["Username",(0,b.jsx)(s.gN,{type:"text",name:"name",placeholder:"Enter your name"}),(0,b.jsx)(s.Bc,{name:"name",component:"b"})]}),(0,b.jsxs)("label",{children:["Email",(0,b.jsx)(s.gN,{type:"email",name:"email",placeholder:"Enter your email"}),(0,b.jsx)(s.Bc,{name:"email",component:"b"})]}),(0,b.jsxs)("label",{children:["Password",(0,b.jsx)(s.gN,{type:"password",name:"password",placeholder:"Enter your password"}),(0,b.jsx)(s.Bc,{name:"password",component:"b"})]}),(0,b.jsx)("button",{type:"submit",children:"Register"})]})})]})}var f=(0,u.vJ)(o||(o=(0,p.Z)(["\nbody{\n background-image: url('https://kartinki.pics/uploads/posts/2021-07/thumbs/1625655412_56-kartinkin-com-p-biblioteka-art-art-krasivo-61.jpg');\n}\n"]))),j=t(8346);function k(){return(0,b.jsxs)(j.x,{children:[(0,b.jsx)(a.q,{title:"Registration"}),(0,b.jsx)(h,{}),(0,b.jsx)(f,{})]})}}}]); -//# sourceMappingURL=905.233b722d.chunk.js.map \ No newline at end of file diff --git a/static/js/905.233b722d.chunk.js.map b/static/js/905.233b722d.chunk.js.map deleted file mode 100644 index ba2e9e9..0000000 --- a/static/js/905.233b722d.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/js/905.233b722d.chunk.js","mappings":"4SAGaA,GAAkBC,EAAAA,EAAAA,IAAiBC,IAAAA,GAAAC,EAAAA,EAAAA,GAAA,mRAIpBC,G,mBCDb,SAASC,IACtB,IAAQC,GAAeC,EAAAA,EAAAA,KAAfD,WAER,OACEE,EAAAA,EAAAA,MAAAC,EAAAA,SAAA,CAAAC,SAAA,EACEC,EAAAA,EAAAA,KAACC,EAAAA,EAAM,CAACC,MAAM,cAEZP,GAGAE,EAAAA,EAAAA,MAACM,EAAAA,EAAG,CAAAJ,SAAA,EACFC,EAAAA,EAAAA,KAAA,MAAII,MAAO,CAAEC,SAAU,IAAKN,SAAC,iBAC7BC,EAAAA,EAAAA,KAAA,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CrC,EAAAA,EAAAA,KAACsC,EAAAA,GAAY,CAACtB,KAAK,OAAOuB,UAAU,UAEtC1C,EAAAA,EAAAA,MAAA,SAAAE,SAAA,CAAO,SAELC,EAAAA,EAAAA,KAACmC,EAAAA,GAAK,CAACC,KAAK,QAAQpB,KAAK,QAAQqB,YAAY,sBAC7CrC,EAAAA,EAAAA,KAACsC,EAAAA,GAAY,CAACtB,KAAK,QAAQuB,UAAU,UAEvC1C,EAAAA,EAAAA,MAAA,SAAAE,SAAA,CAAO,YAELC,EAAAA,EAAAA,KAACmC,EAAAA,GAAK,CACJC,KAAK,WACLpB,KAAK,WACLqB,YAAY,yBAEdrC,EAAAA,EAAAA,KAACsC,EAAAA,GAAY,CAACtB,KAAK,WAAWuB,UAAU,UAE1CvC,EAAAA,EAAAA,KAAA,UAAQoC,KAAK,SAAQrC,SAAC,oBAKhC,CCrEO,IAAMyC,GAAgBlD,EAAAA,EAAAA,IAAiBC,IAAAA,GAAAC,EAAAA,EAAAA,GAAA,sK,UCI/B,SAASkB,IACtB,OACEb,EAAAA,EAAAA,MAACM,EAAAA,EAAG,CAAAJ,SAAA,EACFC,EAAAA,EAAAA,KAACC,EAAAA,EAAM,CAACC,MAAM,kBAEdF,EAAAA,EAAAA,KAACqB,EAAY,KACbrB,EAAAA,EAAAA,KAACwC,EAAa,MAGpB,C","sources":["pages/Home.styled.js","pages/Home.jsx","components/RegisterForm/RegisterForm.styled.js","components/RegisterForm/RegisterForm.jsx","pages/Register.styled.js","pages/Register.jsx"],"sourcesContent":["import { createGlobalStyle } from 'styled-components';\nimport HomeImage from '../images/home.jpg';\n\nexport const HomeGlobalStyle = createGlobalStyle`\nbody{\n /* background-image: url('https://kartinki.pics/uploads/posts/2021-07/1625655366_42-kartinkin-com-p-biblioteka-art-art-krasivo-47.jpg'); */\n\n background-image: url(${HomeImage});\n}\n\nsvg{\n width: 220px;\n height: 220px;\n color: midnightblue;\n}\n`;\n","import { Helmet } from 'react-helmet';\nimport Register from './Register';\nimport { useAuth } from 'hooks';\nimport { Box } from 'components/GlobalStyle';\nimport { HomeGlobalStyle } from './Home.styled';\nimport { GiOldMicrophone } from 'react-icons/gi';\nexport default function Home() {\n const { isLoggedIn } = useAuth();\n\n return (\n <>\n \n\n {!isLoggedIn ? (\n \n ) : (\n \n

    WELCOME !!!

    \n \n It's your\n \n

    Phonebook Organizer

    \n\n \n \n
    \n )}\n \n );\n}\n","import { Form } from 'formik';\nimport { styled } from 'styled-components';\n\nexport const FormThumb = styled(Form)`\n display: flex;\n flex-direction: column;\n gap: 13px;\n background-color: rgba(202, 202, 202, 0.8);\n width: 480px;\n margin: auto;\n border: 2px outset black;\n border-radius: 13px;\n padding: 20px 28px;\n margin-bottom: 28px;\n\n button {\n font-weight: bold;\n margin-bottom: 28px;\n padding: 4px 8px;\n border-radius: 22px;\n text-transform: uppercase;\n background-color: rgba(144, 144, 144, 0.8);\n }\n\n button:hover,\n button:focus {\n background-color: black;\n color: white;\n }\n\n label {\n font-style: oblique;\n font-weight: 500;\n margin-bottom: 13px;\n\n b {\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n color: darkred;\n text-transform: lowercase;\n }\n\n input {\n margin-top: 8px;\n width: 100%;\n padding: 2px 13px;\n border-radius: 13px;\n outline: none;\n text-align: center;\n /* background-color: rgba(255, 255, 255, 0); */\n }\n }\n`;\n","import { ErrorMessage, Field, Formik } from 'formik';\nimport * as Yup from 'yup';\nimport { useDispatch } from 'react-redux';\nimport { register } from 'redux/auth/authOperations';\nimport { FormThumb } from './RegisterForm.styled';\nimport { Link } from 'react-router-dom';\n// import LoadingSpinnerComponent from 'react-spinners-components';\n\nconst formSchema = Yup.object({\n name: Yup.string().required('Must be filled'),\n email: Yup.string().email().required('Must be filled'),\n password: Yup.string().min(8).required('Must be filled'),\n});\n\nexport default function RegisterForm() {\n const dispatch = useDispatch();\n\n // const handleSubmit = e => {\n // e.preventDefault();\n // const form = e.currentTarget;\n // dispatch(\n // register({\n // name: form.elements.name.value,\n // email: form.elements.email.value,\n // password: form.elements.password.value,\n // })\n // );\n // form.reset();\n // };\n\n const initialValues = { name: '', email: '', password: '' };\n\n return (\n <>\n

    Registration Form

    \n
    \n Have an account already? Sign Up please!\n
    \n {\n dispatch(register({ ...values }));\n // actions.resetForm();\n }}\n >\n \n \n \n \n \n \n \n \n );\n}\n\n// {/* ; */}\n","import { createGlobalStyle } from 'styled-components';\n\nexport const RegisterStyle = createGlobalStyle`\nbody{\n background-image: url('https://kartinki.pics/uploads/posts/2021-07/thumbs/1625655412_56-kartinkin-com-p-biblioteka-art-art-krasivo-61.jpg');\n}\n`;\n","import { Helmet } from 'react-helmet';\nimport RegisterForm from 'components/RegisterForm/RegisterForm';\n// import { RegisterForm } from 'components/RegisterForm/RegisterForm';\nimport { RegisterStyle } from './Register.styled';\nimport { Box } from 'components/GlobalStyle';\n\nexport default function Register() {\n return (\n \n \n\n \n \n \n );\n}\n"],"names":["HomeGlobalStyle","createGlobalStyle","_templateObject","_taggedTemplateLiteral","HomeImage","Home","isLoggedIn","useAuth","_jsxs","_Fragment","children","_jsx","Helmet","title","Box","style","fontSize","display","marginBottom","textTransform","GiOldMicrophone","Register","FormThumb","styled","Form","formSchema","Yup","name","required","email","password","min","RegisterForm","dispatch","useDispatch","Link","to","Formik","initialValues","validationSchema","onSubmit","values","actions","register","_objectSpread","autoComplete","Field","type","placeholder","ErrorMessage","component","RegisterStyle"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/main.b26ba3c9.js b/static/js/main.41965c3a.js similarity index 88% rename from static/js/main.b26ba3c9.js rename to static/js/main.41965c3a.js index d726a1e..476c4c7 100644 --- a/static/js/main.b26ba3c9.js +++ b/static/js/main.41965c3a.js @@ -1,3 +1,3 @@ -/*! For license information please see main.b26ba3c9.js.LICENSE.txt */ -!function(){var e={8346:function(e,t,n){"use strict";n.d(t,{x:function(){return l},Z:function(){return u}});var r,o,a=n(168),i=n(5867),u=(0,i.vJ)(r||(r=(0,a.Z)(["\nbody {\n margin: 0;\n background-color: whitesmoke;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n\n /* background-image: url('https://bogatyr.club/uploads/posts/2023-03/1679420906_bogatyr-club-p-biblioteka-oboi-foni-pinterest-1.jpg'); */\n background-repeat: no-repeat;\n background-size: cover;\n background-attachment: fixed;\n overflow-x: hidden;\n\n scroll-behavior: smooth;\n transition: 2500ms;\n\n &::-webkit-scrollbar {\n appearance: none;\n background: transparent;\n width: 0;\n /* height: 0; */\n }\n\n /* .main{\n transform: scale(0.2);\n transition: transform 800 ease-in-out;\n\n &:hover{\n transform: scale(1.2);\n }\n } */\n}\n\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n\nh1,\nh2,\nh3,\nh4,\np {\n margin: 0;\n font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;\n}\n\nul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\nbutton {\n cursor: pointer;\n}\n"]))),l=i.zo.div(o||(o=(0,a.Z)(["\n margin: 22px auto;\n padding: 40px;\n width: 780px;\n height: fit-content;\n border: 4px outset #000;\n border-radius: 13px;\n background-color: rgba(119, 136, 153, 0.8);\n text-align: center;\n /* animation: start 2s;\n\n @keyframes start {\n from {\n height: 0;\n }\n to {\n height: fit-content;\n }\n } */\n\n h1,\n h2,\n h3 {\n color: midnightblue;\n border: 4px outset midnightblue;\n background-color: lightgoldenrodyellow;\n max-width: max-content;\n border-radius: 8px;\n padding-left: 8px;\n padding-right: 8px;\n margin: auto;\n margin-bottom: 28px;\n }\n\n b {\n color: midnightblue;\n font-size: 15px;\n }\n"])))},6340:function(e,t,n){"use strict";n.d(t,{a:function(){return u}});var r=n(9434),o=function(e){return e.auth.isLoggedIn},a=function(e){return e.auth.user},i=function(e){return e.auth.isRefreshing},u=function(){return{isLoggedIn:(0,r.v9)(o),isRefreshing:(0,r.v9)(i),user:(0,r.v9)(a)}}},5822:function(e,t,n){"use strict";n.d(t,{Ib:function(){return s},bi:function(){return f},ni:function(){return c},z2:function(){return l}});var r=n(5861),o=n(1243),a=n(6382);function i(){i=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),u=new R(r||[]);return o(i,"_invoke",{value:C(e,n,u)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p="suspendedStart",h="executing",m="completed",v={};function y(){}function g(){}function b(){}var w={};c(w,u,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(N([])));E&&E!==n&&r.call(E,u)&&(w=E);var k=b.prototype=y.prototype=Object.create(w);function x(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(o,a,i,u){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,c=s.value;return c&&"object"==typeof c&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,i,u)}),(function(e){n("throw",e,i,u)})):t.resolve(c).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,u)}))}u(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function C(t,n,r){var o=p;return function(a,i){if(o===h)throw new Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var u=r.delegate;if(u){var l=_(u,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var s=d(t,n,r);if("normal"===s.type){if(o=r.done?m:"suspendedYield",s.arg===v)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=m,r.method="throw",r.arg=s.arg)}}}function _(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,_(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=d(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function N(t){if(t||""===t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(l&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}o.Z.defaults.baseURL="https://connections-api.herokuapp.com";var u=function(e){o.Z.defaults.headers.common.Authorization="Bearer ".concat(e)},l=(0,a.hg)("auth/register",function(){var e=(0,r.Z)(i().mark((function e(t,n){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.Z.post("/users/signup",t);case 3:return r=e.sent,u(r.data.token),e.abrupt("return",r.data);case 8:return e.prev=8,e.t0=e.catch(0),alert("Sorry, such email exists already..."),e.abrupt("return",n.rejectWithValue(e.t0.message));case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t,n){return e.apply(this,arguments)}}()),s=(0,a.hg)("auth/login",function(){var e=(0,r.Z)(i().mark((function e(t,n){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.Z.post("/users/login",t);case 3:return r=e.sent,u(r.data.token),e.abrupt("return",r.data);case 8:return e.prev=8,e.t0=e.catch(0),alert("Sorry, email or password is wrong..."),e.abrupt("return",n.rejectWithValue(e.t0.message));case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t,n){return e.apply(this,arguments)}}()),c=(0,a.hg)("auth/logout",function(){var e=(0,r.Z)(i().mark((function e(t,n){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.Z.post("/users/logout");case 3:o.Z.defaults.headers.common.Authorization="",e.next=9;break;case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",n.rejectWithValue(e.t0.message));case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t,n){return e.apply(this,arguments)}}()),f=(0,a.hg)("auth/refresh",function(){var e=(0,r.Z)(i().mark((function e(t,n){var r,a,l;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.getState(),null!==(a=r.auth.token)){e.next=4;break}return e.abrupt("return",n.rejectWithValue("Unable to fetch user"));case 4:return e.prev=4,u(a),e.next=8,o.Z.get("/users/current");case 8:return l=e.sent,e.abrupt("return",l.data);case 12:return e.prev=12,e.t0=e.catch(4),e.abrupt("return",n.rejectWithValue(e.t0.message));case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(t,n){return e.apply(this,arguments)}}())},1538:function(e,t,n){"use strict";n.d(t,{j:function(){return m},o:function(){return l}});var r=n(3433),o=n(1413),a=n(6382),i=n(5218),u=n(3634),l=i.Am.loading("",{position:"top-center"}),s=function(e){e.isLoading=!0,i.Am.loading("Waiting...",{id:l,position:"top-center"})},c=function(e,t){e.isLoading=!1,e.error=null,e.items=t.payload,i.Am.dismiss(l),i.Am.success("You`ve got this!",{duration:2800,position:"top-center"})},f=function(e,t){e.isLoading=!1,e.error=t.payload,i.Am.dismiss(l),i.Am.error(e.error,{duration:2800,position:"top-center"})},d=function(e,t){return i.Am.dismiss(l),i.Am.success("Contact is added!",{duration:2800,position:"top-center"}),(0,o.Z)((0,o.Z)({},e),{},{items:[].concat((0,r.Z)(e.items),[t.payload])})},p=function(e,t){return i.Am.dismiss(l),i.Am.success("Contact is deleted!",{duration:2800,position:"top-center"}),(0,o.Z)((0,o.Z)({},e),{},{items:e.items.filter((function(e){return e.id!==t.payload.id}))})},h=function(e,t){return(0,o.Z)((0,o.Z)({},e),{},{items:e.items.map((function(e){return e.id===t.payload.id?t.payload:e}))})},m=(0,a.oM)({name:"contacts",initialState:{items:[],isLoading:!1,error:null},extraReducers:function(e){e.addCase(u.yF.pending,s).addCase(u.yF.fulfilled,c).addCase(u.yF.rejected,f).addCase(u.v6.pending,s).addCase(u.v6.fulfilled,d).addCase(u.v6.rejected,f).addCase(u.in.pending,s).addCase(u.in.fulfilled,p).addCase(u.in.rejected,f).addCase(u.LG.pending,s).addCase(u.LG.fulfilled,h).addCase(u.LG.rejected,f)}}).reducer},4808:function(e,t,n){"use strict";n.d(t,{u:function(){return o},y:function(){return a}});var r=(0,n(6382).oM)({name:"filter",initialState:"",reducers:{searchFilter:function(e,t){return"".concat(t.payload)}}}),o=r.reducer,a=r.actions.searchFilter},3634:function(e,t,n){"use strict";n.d(t,{LG:function(){return c},in:function(){return s},v6:function(){return l},yF:function(){return u}});var r=n(5861),o=n(6382),a=n(1243);function i(){i=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),u=new R(r||[]);return o(i,"_invoke",{value:C(e,n,u)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p="suspendedStart",h="executing",m="completed",v={};function y(){}function g(){}function b(){}var w={};c(w,u,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(N([])));E&&E!==n&&r.call(E,u)&&(w=E);var k=b.prototype=y.prototype=Object.create(w);function x(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(o,a,i,u){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,c=s.value;return c&&"object"==typeof c&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,i,u)}),(function(e){n("throw",e,i,u)})):t.resolve(c).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,u)}))}u(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function C(t,n,r){var o=p;return function(a,i){if(o===h)throw new Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var u=r.delegate;if(u){var l=_(u,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var s=d(t,n,r);if("normal"===s.type){if(o=r.done?m:"suspendedYield",s.arg===v)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=m,r.method="throw",r.arg=s.arg)}}}function _(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,_(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=d(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function N(t){if(t||""===t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(l&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}var u=(0,o.hg)("contacts/fetchContacts",function(){var e=(0,r.Z)(i().mark((function e(t,n){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a.Z.get("/contacts");case 3:return r=e.sent,e.abrupt("return",r.data);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",n.rejectWithValue(e.t0.message));case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,n){return e.apply(this,arguments)}}()),l=(0,o.hg)("contacts/addContact",function(){var e=(0,r.Z)(i().mark((function e(t,n){var r,o,u;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.name,o=t.number,e.prev=1,e.next=4,a.Z.post("/contacts",{name:r,number:o});case 4:return u=e.sent,e.abrupt("return",u.data);case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",n.rejectWithValue(e.t0.message));case 11:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t,n){return e.apply(this,arguments)}}()),s=(0,o.hg)("contacts/deleteContact",function(){var e=(0,r.Z)(i().mark((function e(t,n){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a.Z.delete("/contacts/".concat(t));case 3:return r=e.sent,e.abrupt("return",r.data);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",n.rejectWithValue(e.t0.message));case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,n){return e.apply(this,arguments)}}()),c=(0,o.hg)("contacts/editContact",function(){var e=(0,r.Z)(i().mark((function e(t,n){var r,o,u,l;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.name,o=t.number,u=t.contactId,e.prev=1,e.next=4,a.Z.patch("/contacts/".concat(u),{name:r,number:o});case 4:return l=e.sent,e.abrupt("return",l.data);case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",n.rejectWithValue(e.t0.message));case 11:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t,n){return e.apply(this,arguments)}}())},9778:function(e,t,n){"use strict";n.d(t,{KE:function(){return s},_5:function(){return l},fR:function(){return c},gI:function(){return u}});var r=n(7762),o=n(6382),a=(0,o.oM)({name:"tasks",initialState:[],reducers:{addTask:{reducer:function(e,t){e.push(t.payload)},prepare:function(e){return{payload:{text:e,id:(0,o.x0)(),completed:!1}}}},deleteTask:function(e,t){var n=e.findIndex((function(e){return e.id===t.payload}));e.splice(n,1)},toggleCompleted:function(e,t){var n,o=(0,r.Z)(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.id===t.payload){a.completed=!a.completed;break}}}catch(i){o.e(i)}finally{o.f()}}}}),i=a.actions,u=i.addTask,l=i.deleteTask,s=i.toggleCompleted,c=a.reducer},6382:function(e,t,n){"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:d(e)?2:p(e)?3:0}function l(e,t){return 2===u(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function s(e,t){return 2===u(e)?e.get(t):e[t]}function c(e,t,n){var r=u(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function d(e){return Z&&e instanceof Map}function p(e){return W&&e instanceof Set}function h(e){return e.o||e.t}function m(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=G(e);delete t[K];for(var n=Q(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=y),Object.freeze(e),t&&i(e,(function(e,t){return v(t,!0)}),!0)),e}function y(){r(2)}function g(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function b(e){var t=Y[e];return t||r(18,e),t}function w(e,t){Y[e]||(Y[e]=t)}function S(){return U}function E(e,t){t&&(b("Patches"),e.u=[],e.s=[],e.v=t)}function k(e){x(e),e.p.forEach(C),e.p=null}function x(e){e===U&&(U=e.l)}function O(e){return U={p:[],l:U,h:e,m:!0,_:0}}function C(e){var t=e[K];0===t.i||1===t.i?t.j():t.g=!0}function _(e,t){t._=t.p.length;var n=t.p[0],o=void 0!==e&&e!==n;return t.h.O||b("ES5").S(t,e,o),o?(n[K].P&&(k(t),r(4)),a(e)&&(e=P(t,e),t.l||R(t,e)),t.u&&b("Patches").M(n[K].t,e,t.u,t.s)):e=P(t,n,[]),k(t),t.u&&t.v(t.u,t.s),e!==H?e:void 0}function P(e,t,n){if(g(t))return t;var r=t[K];if(!r)return i(t,(function(o,a){return T(e,r,t,o,a,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return R(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=m(r.k):r.o,a=o,u=!1;3===r.i&&(a=new Set(o),o.clear(),u=!0),i(a,(function(t,a){return T(e,r,o,t,a,n,u)})),R(e,o,!1),n&&e.u&&b("Patches").N(r,n,e.u,e.s)}return r.o}function T(e,t,n,r,i,u,s){if(o(i)){var f=P(e,i,u&&t&&3!==t.i&&!l(t.R,r)?u.concat(r):void 0);if(c(n,r,f),!o(f))return;e.m=!1}else s&&n.add(i);if(a(i)&&!g(i)){if(!e.h.D&&e._<1)return;P(e,i),t&&t.A.l||R(e,i)}}function R(e,t,n){void 0===n&&(n=!1),!e.l&&e.h.D&&e.m&&v(t,n)}function N(e,t){var n=e[K];return(n?h(n):e)[t]}function j(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function L(e){e.P||(e.P=!0,e.l&&L(e.l))}function A(e){e.o||(e.o=m(e.t))}function z(e,t,n){var r=d(t)?b("MapSet").F(t,n):p(t)?b("MapSet").T(t,n):e.O?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:S(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=r,a=J;n&&(o=[r],a=X);var i=Proxy.revocable(o,a),u=i.revoke,l=i.proxy;return r.k=l,r.j=u,l}(t,n):b("ES5").J(t,n);return(n?n.A:S()).p.push(r),r}function D(e){return o(e)||r(22,e),function e(t){if(!a(t))return t;var n,r=t[K],o=u(t);if(r){if(!r.P&&(r.i<4||!b("ES5").K(r)))return r.t;r.I=!0,n=I(t,o),r.I=!1}else n=I(t,o);return i(n,(function(t,o){r&&s(r.t,t)===o||c(n,t,e(o))})),3===o?new Set(n):n}(e)}function I(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return m(e)}function M(){function e(e,t){var n=a[e];return n?n.enumerable=t:a[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[K];return J.get(t,e)},set:function(t){var n=this[K];J.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var o=e[t][K];if(!o.P)switch(o.i){case 5:r(o)&&L(o);break;case 4:n(o)&&L(o)}}}function n(e){for(var t=e.t,n=e.k,r=Q(n),o=r.length-1;o>=0;o--){var a=r[o];if(a!==K){var i=t[a];if(void 0===i&&!l(t,a))return!0;var u=n[a],s=u&&u[K];if(s?s.t!==i:!f(u,i))return!0}}var c=!!t[K];return r.length!==Q(t).length+(c?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r1?r-1:0),a=1;a1?r-1:0),a=1;a=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var a=b("Patches").$;return o(e)?a(e,t):this.produce(e,(function(e){return a(e,t)}))},e}(),te=new ee,ne=te.produce,re=(te.produceWithPatches.bind(te),te.setAutoFreeze.bind(te),te.setUseProxies.bind(te),te.applyPatches.bind(te),te.createDraft.bind(te),te.finishDraft.bind(te),ne),oe=n(7781);function ae(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"===typeof o?o(n,r,e):t(o)}}}}var ie=ae();ie.withExtraArgument=ae;var ue=ie,le=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),se=function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function C(e,t,n,r){void 0===r&&(r={});var o=r,a=o.window,i=void 0===a?document.defaultView:a,u=o.v5Compat,l=void 0!==u&&u,s=i.history,c=p.Pop,f=null,d=h();function h(){return(s.state||{idx:null}).idx}function m(){c=p.Pop;var e=h(),t=null==e?null:e-d;d=e,f&&f({action:c,location:b.location,delta:t})}function y(e){var t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"===typeof e?e:x(e);return w(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==d&&(d=0,s.replaceState(v({},s.state,{idx:d}),""));var b={get action(){return c},get location(){return e(i,s)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(g,m),f=e,function(){i.removeEventListener(g,m),f=null}},createHref:function(e){return t(i,e)},createURL:y,encodeLocation:function(e){var t=y(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c=p.Push;var r=k(b.location,e,t);n&&n(r,e);var o=E(r,d=h()+1),a=b.createHref(r);try{s.pushState(o,"",a)}catch(u){if(u instanceof DOMException&&"DataCloneError"===u.name)throw u;i.location.assign(a)}l&&f&&f({action:c,location:b.location,delta:1})},replace:function(e,t){c=p.Replace;var r=k(b.location,e,t);n&&n(r,e);var o=E(r,d=h()),a=b.createHref(r);s.replaceState(o,"",a),l&&f&&f({action:c,location:b.location,delta:0})},go:function(e){return s.go(e)}};return b}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(y||(y={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function _(e,t,n){void 0===n&&(n="/");var r=D(("string"===typeof t?O(t):t).pathname||"/",n);if(null==r)return null;var o=P(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(o);for(var a=null,i=0;null==a&&i0&&(w(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+u+'".'),P(e.children,t,l,u)),(null!=e.path||e.index)&&t.push({path:u,score:j(u,e.index),routesMeta:l})};return e.forEach((function(e,t){var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?")){var r,a=(0,h.Z)(T(e.path));try{for(a.s();!(r=a.n()).done;){var i=r.value;o(e,t,i)}}catch(u){a.e(u)}finally{a.f()}}else o(e,t)})),t}function T(e){var t=e.split("/");if(0===t.length)return[];var n,r=(n=t,(0,s.Z)(n)||(0,c.Z)(n)||(0,f.Z)(n)||(0,d.Z)()),o=r[0],a=r.slice(1),i=o.endsWith("?"),u=o.replace(/\?$/,"");if(0===a.length)return i?[u,""]:[u];var l=T(a.join("/")),p=[];return p.push.apply(p,(0,m.Z)(l.map((function(e){return""===e?u:[u,e].join("/")})))),i&&p.push.apply(p,(0,m.Z)(l)),p.map((function(t){return e.startsWith("/")&&""===t?"/":t}))}var R=/^:\w+$/,N=function(e){return"*"===e};function j(e,t){var n=e.split("/"),r=n.length;return n.some(N)&&(r+=-2),t&&(r+=2),n.filter((function(e){return!N(e)})).reduce((function(e,t){return e+(R.test(t)?3:""===t?1:10)}),r)}function L(e,t){for(var n=e.routesMeta,r={},o="/",a=[],i=0;i and the router will parse it for you.'}function M(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function F(e,t,n,r){var o;void 0===r&&(r=!1),"string"===typeof e?o=O(e):(w(!(o=v({},e)).pathname||!o.pathname.includes("?"),I("?","pathname","search",o)),w(!o.pathname||!o.pathname.includes("#"),I("#","pathname","hash",o)),w(!o.search||!o.search.includes("#"),I("#","search","hash",o)));var a,i=""===e||""===o.pathname,u=i?"/":o.pathname;if(r||null==u)a=n;else{var l=t.length-1;if(u.startsWith("..")){for(var s=u.split("/");".."===s[0];)s.shift(),l-=1;o.pathname=s.join("/")}a=l>=0?t[l]:"/"}var c=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?O(e):e,r=n.pathname,o=n.search,a=void 0===o?"":o,i=n.hash,u=void 0===i?"":i,l=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:l,search:Z(a),hash:W(u)}}(o,a),f=u&&"/"!==u&&u.endsWith("/"),d=(i||"."===u)&&n.endsWith("/");return c.pathname.endsWith("/")||!f&&!d||(c.pathname+="/"),c}var U=function(e){return e.join("/").replace(/\/\/+/g,"/")},B=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},Z=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},W=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""},$=function(e){(0,a.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,o.Z)(this,n),t.apply(this,arguments)}return(0,r.Z)(n)}((0,u.Z)(Error));function H(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}var V=["post","put","patch","delete"],K=(new Set(V),["get"].concat(V));new Set(K),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred")},2110:function(e,t,n){"use strict";var r=n(8309),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function l(e){return r.isMemo(e)?i:u[e.$$typeof]||o}u[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[r.Memo]=i;var s=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var i=c(n);f&&(i=i.concat(f(n)));for(var u=l(t),m=l(n),v=0;v