style: auto format whole project

This commit is contained in:
Ali BARIN
2022-11-05 23:57:33 +01:00
parent e338770e57
commit 475f24f661
199 changed files with 2421 additions and 1839 deletions

View File

@@ -6,16 +6,19 @@ export type AuthenticationContextParams = {
updateToken: (token: string) => void;
};
export const AuthenticationContext = React.createContext<AuthenticationContextParams>({
token: null,
updateToken: () => void 0,
});
export const AuthenticationContext =
React.createContext<AuthenticationContextParams>({
token: null,
updateToken: () => void 0,
});
type AuthenticationProviderProps = {
children: React.ReactNode;
};
export const AuthenticationProvider = (props: AuthenticationProviderProps): React.ReactElement => {
export const AuthenticationProvider = (
props: AuthenticationProviderProps
): React.ReactElement => {
const { children } = props;
const [token, setToken] = React.useState(() => getItem('token'));
@@ -30,10 +33,8 @@ export const AuthenticationProvider = (props: AuthenticationProviderProps): Reac
}, [token]);
return (
<AuthenticationContext.Provider
value={value}
>
<AuthenticationContext.Provider value={value}>
{children}
</AuthenticationContext.Provider>
);
};
};