Add eslint rule and fix as many issues as possible

This commit is contained in:
Khoa Le
2023-06-19 23:42:04 -04:00
parent e9eacc445d
commit 9d33e4756b
689 changed files with 9446 additions and 21821 deletions
@@ -1,7 +1,7 @@
import { createContext, ReactNode, useContext, useMemo } from 'react';
import { createContext, ReactNode, useContext, useMemo } from "react";
import { useGetUser } from '@app/hooks/api';
import { User } from '@app/hooks/api/types';
import { useGetUser } from "@app/hooks/api";
import { User } from "@app/hooks/api/types";
type TUserContext = {
user: User;
@@ -31,7 +31,7 @@ export const UserProvider = ({ children }: Props): JSX.Element => {
export const useUser = () => {
const ctx = useContext(UserContext);
if (!ctx) {
throw new Error('useUser has to be used within <UserContext.Provider>');
throw new Error("useUser has to be used within <UserContext.Provider>");
}
return ctx;