mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 14:27:23 +00:00
Add eslint rule and fix as many issues as possible
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -1 +1 @@
|
||||
export { UserProvider, useUser } from './UserContext';
|
||||
export { UserProvider, useUser } from "./UserContext";
|
||||
|
||||
Reference in New Issue
Block a user