diff --git a/src/Components/Profile/ProfileView.tsx b/src/Components/Profile/ProfileView.tsx index 97d7756..04c96bf 100644 --- a/src/Components/Profile/ProfileView.tsx +++ b/src/Components/Profile/ProfileView.tsx @@ -24,7 +24,7 @@ export function ProfileView ({ userType, attestationApi }: { userType: string, a const [offers, setOffers] = useState>([]) const [needs, setNeeds] = useState>([]) const [loading, setLoading] = useState(false) - const [template/* , setTemplate */] = useState('') + const [template , setTemplate] = useState('') 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 &&