Open Raunakk02 opened 2 years ago
Hi @Raunakk02 , can you please squash your commits and follow the commit message guidelines.
Hi @sjha2048, thanks for reviewing the PR. As suggested by you, I have squashed and updated the commits as per the commit message guidelines. Please let me know if any other change is needed.
When I login, I see following error:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
getLocalStorage
src/shared/storageHelper.js:59
56 | // Get from localstorage
57 | export const getLocalStorage = (key) => {
58 | if (typeof window !== "undefined") {
> 59 | return JSON.parse(localStorage.getItem(key));
60 | }
61 | return null;
62 | };
UserInfoDropdown
src/components/Header/Dropdowns/UserInfoDropdown.jsx:43
40 | import { getNameInitials } from "shared/helper";
41 |
42 | const UserInfoDropdown = () => {
> 43 | const [currentGroup, setCurrentGroup] = useState(
44 | getLocalStorage("currentGroup") || getLocalStorage("user")?.default_group
45 | );
46 | const history = useHistory();
@GMishx please have a look at this PR created by @krishna9304. He has fixed the issue. It was out of the scope of this particular PR and some other contributors (including me) was facing it too.
This pull request has conflicts, please rebase to resolve those before we can evaluate the pull request.
Description
Refactored the files inside
src/components
folderChanges
Implemented the changes as proposed in this comment of issue #108
How to test
Since the changes are just related to refactoring, simple testing of the UI components should be sufficient.
fixes #108