estate navigator: define EstateError before its use
This commit is contained in:
parent
d7afdc5208
commit
98d74d564d
1 changed files with 12 additions and 12 deletions
|
|
@ -260,6 +260,18 @@ function EntryPoints() {
|
|||
);
|
||||
}
|
||||
|
||||
/** A short message that wraps inside the navigator; never a raw request error. */
|
||||
function EstateError({ message }: { message: string }) {
|
||||
return (
|
||||
<Text
|
||||
size="T300"
|
||||
style={{ color: color.Critical.Main, padding: 16, overflowWrap: 'anywhere' }}
|
||||
>
|
||||
{message}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function EstateTiers({ rootId }: { rootId: string }) {
|
||||
const { fetching, error, tiers } = useEstate(rootId);
|
||||
|
||||
|
|
@ -280,18 +292,6 @@ function EstateTiers({ rootId }: { rootId: string }) {
|
|||
);
|
||||
}
|
||||
|
||||
/** A short message that wraps inside the navigator; never a raw request error. */
|
||||
function EstateError({ message }: { message: string }) {
|
||||
return (
|
||||
<Text
|
||||
size="T300"
|
||||
style={{ color: color.Critical.Main, padding: 16, overflowWrap: 'anywhere' }}
|
||||
>
|
||||
{message}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
/** The single navigator: every nav slot that lists rooms mounts this. */
|
||||
export function EstateNavigator() {
|
||||
const openRoomFinder = useSetAtom(searchModalAtom);
|
||||
|
|
|
|||
Loading…
Reference in a new issue