mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
restore setTemplate
This commit is contained in:
parent
3dc533676e
commit
997c31c8f5
@ -24,7 +24,7 @@ export function ProfileView ({ userType, attestationApi }: { userType: string, a
|
||||
const [offers, setOffers] = useState<Array<Tag>>([])
|
||||
const [needs, setNeeds] = useState<Array<Tag>>([])
|
||||
const [loading, setLoading] = useState<boolean>(false)
|
||||
const [template/* , setTemplate */] = useState<string>('')
|
||||
const [template , setTemplate] = useState<string>('')
|
||||
|
||||
const location = useLocation()
|
||||
const items = useItems()
|
||||
@ -134,6 +134,11 @@ export function ProfileView ({ userType, attestationApi }: { userType: string, a
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [selectPosition])
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
setTemplate(item?.layer?.itemType.template || userType);
|
||||
}, [userType, item])
|
||||
|
||||
return (
|
||||
<>
|
||||
{item &&
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user