From 9e4a6bc1acd579cda640937f504cb3ce49c993d1 Mon Sep 17 00:00:00 2001 From: Spectralitree Date: Wed, 9 Dec 2020 10:23:21 +0100 Subject: [PATCH] Fix routing --- .eslintcache | 2 +- src/App.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.eslintcache b/.eslintcache index 9bcfebf3..63ab50d7 100644 --- a/.eslintcache +++ b/.eslintcache @@ -1 +1 @@ -[{"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\index.js":"1","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\History.js":"2","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\App.js":"3","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Dash.js":"4","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Constants\\constants.js":"5","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Loading.js":"6","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Navigation.js":"7","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\System.js":"8","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Memberlist.js":"9","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\MemberCard.js":"10"},{"size":309,"mtime":1607504507185,"results":"11","hashOfConfig":"12"},{"size":87,"mtime":1607504507181,"results":"13","hashOfConfig":"12"},{"size":3533,"mtime":1607504507165,"results":"14","hashOfConfig":"12"},{"size":297,"mtime":1607504507172,"results":"15","hashOfConfig":"12"},{"size":73,"mtime":1607504507180,"results":"16","hashOfConfig":"12"},{"size":231,"mtime":1607504507174,"results":"17","hashOfConfig":"12"},{"size":671,"mtime":1607504507177,"results":"18","hashOfConfig":"12"},{"size":1694,"mtime":1607504507178,"results":"19","hashOfConfig":"12"},{"size":2160,"mtime":1607504507176,"results":"20","hashOfConfig":"12"},{"size":1894,"mtime":1607504507175,"results":"21","hashOfConfig":"12"},{"filePath":"22","messages":"23","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1uc84gl",{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"34","messages":"35","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"36","messages":"37","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"40","messages":"41","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\index.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\History.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\App.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Dash.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Constants\\constants.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Loading.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Navigation.js",["42"],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\System.js",["43"],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Memberlist.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\MemberCard.js",["44"],{"ruleId":"45","severity":1,"message":"46","line":1,"column":8,"nodeType":"47","messageId":"48","endLine":1,"endColumn":13},{"ruleId":"49","severity":1,"message":"50","line":18,"column":4,"nodeType":"51","endLine":18,"endColumn":22,"suggestions":"52"},{"ruleId":"49","severity":1,"message":"50","line":18,"column":8,"nodeType":"51","endLine":18,"endColumn":28,"suggestions":"53"},"no-unused-vars","'react' is defined but never used.","Identifier","unusedVar","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'toHTML'. Either include it or remove the dependency array.","ArrayExpression",["54"],["55"],{"desc":"56","fix":"57"},{"desc":"58","fix":"59"},"Update the dependencies array to be: [toHTML, user.description]",{"range":"60","text":"61"},"Update the dependencies array to be: [member.description, toHTML]",{"range":"62","text":"63"},[550,568],"[toHTML, user.description]",[541,561],"[member.description, toHTML]"] \ No newline at end of file +[{"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\index.js":"1","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\History.js":"2","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\App.js":"3","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Dash.js":"4","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Constants\\constants.js":"5","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Loading.js":"6","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Navigation.js":"7","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\System.js":"8","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Memberlist.js":"9","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\MemberCard.js":"10"},{"size":309,"mtime":1607504507185,"results":"11","hashOfConfig":"12"},{"size":87,"mtime":1607504507181,"results":"13","hashOfConfig":"12"},{"size":3533,"mtime":1607504507165,"results":"14","hashOfConfig":"12"},{"size":297,"mtime":1607504507172,"results":"15","hashOfConfig":"12"},{"size":73,"mtime":1607504507180,"results":"16","hashOfConfig":"12"},{"size":231,"mtime":1607504507174,"results":"17","hashOfConfig":"12"},{"size":671,"mtime":1607504507177,"results":"18","hashOfConfig":"12"},{"size":1694,"mtime":1607504507178,"results":"19","hashOfConfig":"12"},{"size":2160,"mtime":1607504507176,"results":"20","hashOfConfig":"12"},{"size":1894,"mtime":1607504507175,"results":"21","hashOfConfig":"12"},{"filePath":"22","messages":"23","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1rd8s2n",{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"34","messages":"35","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"36","messages":"37","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"40","messages":"41","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\index.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\History.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\App.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Dash.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Constants\\constants.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Loading.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Navigation.js",["42"],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\System.js",["43"],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Memberlist.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\MemberCard.js",["44"],{"ruleId":"45","severity":1,"message":"46","line":1,"column":8,"nodeType":"47","messageId":"48","endLine":1,"endColumn":13},{"ruleId":"49","severity":1,"message":"50","line":18,"column":4,"nodeType":"51","endLine":18,"endColumn":22,"suggestions":"52"},{"ruleId":"49","severity":1,"message":"50","line":18,"column":8,"nodeType":"51","endLine":18,"endColumn":28,"suggestions":"53"},"no-unused-vars","'react' is defined but never used.","Identifier","unusedVar","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'toHTML'. Either include it or remove the dependency array.","ArrayExpression",["54"],["55"],{"desc":"56","fix":"57"},{"desc":"58","fix":"59"},"Update the dependencies array to be: [toHTML, user.description]",{"range":"60","text":"61"},"Update the dependencies array to be: [member.description, toHTML]",{"range":"62","text":"63"},[550,568],"[toHTML, user.description]",[541,561],"[member.description, toHTML]"] \ No newline at end of file diff --git a/src/App.js b/src/App.js index d3841564..15c2f06f 100644 --- a/src/App.js +++ b/src/App.js @@ -47,7 +47,7 @@ export default function App() { localStorage.setItem('user', JSON.stringify(data)); setIsSubmit(true); setIsLoading(false); - history.push("/dash"); + history.push("/pk-webs/dash"); }) .catch (error => { console.log(error); @@ -64,7 +64,7 @@ export default function App() { - + { !localStorage.getItem('token') || isInvalid ? : }