tweak
This commit is contained in:
@@ -68,12 +68,12 @@ export function Wizard({
|
|||||||
isLoading: isLoadingDid,
|
isLoading: isLoadingDid,
|
||||||
isError: isErrorDid,
|
isError: isErrorDid,
|
||||||
} = useResolveDidQuery(name)
|
} = useResolveDidQuery(name)
|
||||||
|
|
||||||
const {
|
const {
|
||||||
data: starterPack,
|
data: starterPack,
|
||||||
isLoading: isLoadingStarterPack,
|
isLoading: isLoadingStarterPack,
|
||||||
isError: isErrorStarterPack,
|
isError: isErrorStarterPack,
|
||||||
} = useStarterPackQuery({did, rkey})
|
} = useStarterPackQuery({did, rkey})
|
||||||
|
|
||||||
const listUri = starterPack?.list?.uri
|
const listUri = starterPack?.list?.uri
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@@ -89,12 +89,10 @@ export function Wizard({
|
|||||||
isError: isErrorProfile,
|
isError: isErrorProfile,
|
||||||
} = useProfileQuery({did: currentAccount?.did})
|
} = useProfileQuery({did: currentAccount?.did})
|
||||||
|
|
||||||
if (
|
const isEdit = Boolean(name && rkey)
|
||||||
(name &&
|
const isReady = (!isEdit || (isEdit && starterPack && listItems)) && profile
|
||||||
rkey &&
|
|
||||||
(!starterPack || (starterPack && listUri && !listItems))) ||
|
if (!isReady) {
|
||||||
!profile
|
|
||||||
) {
|
|
||||||
return (
|
return (
|
||||||
<ListMaybePlaceholder
|
<ListMaybePlaceholder
|
||||||
isLoading={
|
isLoading={
|
||||||
@@ -109,7 +107,7 @@ export function Wizard({
|
|||||||
errorMessage={_(msg`Could not find that starter pack`)}
|
errorMessage={_(msg`Could not find that starter pack`)}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
} else if (name && rkey && starterPack?.creator.did !== currentAccount?.did) {
|
} else if (isEdit && starterPack?.creator.did !== currentAccount?.did) {
|
||||||
return (
|
return (
|
||||||
<ListMaybePlaceholder
|
<ListMaybePlaceholder
|
||||||
isLoading={false}
|
isLoading={false}
|
||||||
|
|||||||
Reference in New Issue
Block a user