style: auto format whole project
This commit is contained in:
@@ -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>
|
||||
);
|
||||
};
|
||||
};
|
||||
|
@@ -4,20 +4,20 @@ interface IEditorContext {
|
||||
readOnly: boolean;
|
||||
}
|
||||
|
||||
export const EditorContext = React.createContext<IEditorContext>({ readOnly: false });
|
||||
export const EditorContext = React.createContext<IEditorContext>({
|
||||
readOnly: false,
|
||||
});
|
||||
|
||||
type EditorProviderProps = {
|
||||
children: React.ReactNode;
|
||||
value: IEditorContext;
|
||||
}
|
||||
};
|
||||
|
||||
export const EditorProvider = (props: EditorProviderProps): React.ReactElement => {
|
||||
export const EditorProvider = (
|
||||
props: EditorProviderProps
|
||||
): React.ReactElement => {
|
||||
const { children, value } = props;
|
||||
return (
|
||||
<EditorContext.Provider
|
||||
value={value}
|
||||
>
|
||||
{children}
|
||||
</EditorContext.Provider>
|
||||
<EditorContext.Provider value={value}>{children}</EditorContext.Provider>
|
||||
);
|
||||
};
|
||||
|
@@ -6,15 +6,15 @@ export const StepExecutionsContext = React.createContext<IStep[]>([]);
|
||||
type StepExecutionsProviderProps = {
|
||||
children: React.ReactNode;
|
||||
value: IStep[];
|
||||
}
|
||||
};
|
||||
|
||||
export const StepExecutionsProvider = (props: StepExecutionsProviderProps): React.ReactElement => {
|
||||
export const StepExecutionsProvider = (
|
||||
props: StepExecutionsProviderProps
|
||||
): React.ReactElement => {
|
||||
const { children, value } = props;
|
||||
return (
|
||||
<StepExecutionsContext.Provider
|
||||
value={value}
|
||||
>
|
||||
<StepExecutionsContext.Provider value={value}>
|
||||
{children}
|
||||
</StepExecutionsContext.Provider>
|
||||
);
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user