chore: fixing prettier warnings

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2022-04-06 10:55:10 +02:00
parent bd39b86273
commit 3766028309
6 changed files with 22 additions and 15 deletions
@@ -32,8 +32,9 @@ 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.
@@ -104,8 +105,9 @@ export const EntityProvider = (props: 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');
@@ -133,8 +135,9 @@ 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');