[#10432] Pass prettier

Signed-off-by: LvffY <louberger@hotmail.fr>
This commit is contained in:
LvffY
2022-03-31 14:10:36 +02:00
parent 2dcac58fa0
commit 792a0a035f
5 changed files with 14 additions and 21 deletions
@@ -32,9 +32,8 @@ export type EntityLoadingStatus<TEntity extends Entity = Entity> = {
// This context has support for multiple concurrent versions of this package.
// It is currently used in parallel with the old context in order to provide
// a smooth transition, but will eventually be the only context we use.
const NewEntityContext = createVersionedContext<{ 1: EntityLoadingStatus }>(
'entity-context',
);
const NewEntityContext =
createVersionedContext<{ 1: EntityLoadingStatus }>('entity-context');
/**
* Properties for the AsyncEntityProvider component.
@@ -105,9 +104,8 @@ export const EntityProvider = ({ entity, children }: EntityProviderProps) => (
export function useEntity<TEntity extends Entity = Entity>(): {
entity: TEntity;
} {
const versionedHolder = useVersionedContext<{ 1: EntityLoadingStatus }>(
'entity-context',
);
const versionedHolder =
useVersionedContext<{ 1: EntityLoadingStatus }>('entity-context');
if (!versionedHolder) {
throw new Error('Entity context is not available');
@@ -135,9 +133,8 @@ export function useEntity<TEntity extends Entity = Entity>(): {
export function useAsyncEntity<
TEntity extends Entity = Entity,
>(): EntityLoadingStatus<TEntity> {
const versionedHolder = useVersionedContext<{ 1: EntityLoadingStatus }>(
'entity-context',
);
const versionedHolder =
useVersionedContext<{ 1: EntityLoadingStatus }>('entity-context');
if (!versionedHolder) {
throw new Error('Entity context is not available');