mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
removed unused var
This commit is contained in:
parent
1c2fa07285
commit
97add15469
@ -121,7 +121,7 @@ function usePermissionsManager(initialPermissions: Permission[]): {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[permissions, user]
|
[permissions, user, adminRole]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -140,8 +140,6 @@ export function ProfileView({ userType, attestationApi }: { userType: string , a
|
|||||||
setTemplate(item?.layer?.itemType.template || userType);
|
setTemplate(item?.layer?.itemType.template || userType);
|
||||||
}, [userType, item])
|
}, [userType, item])
|
||||||
|
|
||||||
const [ urlParams, setUrlParams] = useState(new URLSearchParams(location.search));
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@ -161,7 +159,7 @@ export function ProfileView({ userType, attestationApi }: { userType: string , a
|
|||||||
}
|
}
|
||||||
|
|
||||||
{template == "tabs" &&
|
{template == "tabs" &&
|
||||||
<TabsView userType={userType} attestations={attestations} setUrlParams={setUrlParams} item={item} loading={loading} offers={offers} needs={needs} relations={relations} updatePermission={updatePermission} linkItem={(id) => linkItem(id, item, updateItem)} unlinkItem={(id) => unlinkItem(id, item, updateItem)}/>
|
<TabsView userType={userType} attestations={attestations} item={item} loading={loading} offers={offers} needs={needs} relations={relations} updatePermission={updatePermission} linkItem={(id) => linkItem(id, item, updateItem)} unlinkItem={(id) => unlinkItem(id, item, updateItem)}/>
|
||||||
}
|
}
|
||||||
</>
|
</>
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import { useAssetApi } from '../../AppShell/hooks/useAssets'
|
|||||||
import { timeAgo } from '../../../Utils/TimeAgo'
|
import { timeAgo } from '../../../Utils/TimeAgo'
|
||||||
|
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
export const TabsView = ({ attestations, userType, item, offers, needs, relations, updatePermission, loading, linkItem, unlinkItem, setUrlParams }: { attestations: Array<any>, userType: string, item: Item, offers: Array<Tag>, needs: Array<Tag>, relations: Array<Item>, updatePermission: boolean, loading: boolean, linkItem: (id: string) => Promise<void>, unlinkItem: (id: string) => Promise<void>, setUrlParams: any }) => {
|
export const TabsView = ({ attestations, userType, item, offers, needs, relations, updatePermission, loading, linkItem, unlinkItem }: { attestations: Array<any>, userType: string, item: Item, offers: Array<Tag>, needs: Array<Tag>, relations: Array<Item>, updatePermission: boolean, loading: boolean, linkItem: (id: string) => Promise<void>, unlinkItem: (id: string) => Promise<void> }) => {
|
||||||
|
|
||||||
const addFilterTag = useAddFilterTag();
|
const addFilterTag = useAddFilterTag();
|
||||||
const [activeTab, setActiveTab] = useState<number>();
|
const [activeTab, setActiveTab] = useState<number>();
|
||||||
@ -42,7 +42,6 @@ export const TabsView = ({ attestations, userType, item, offers, needs, relation
|
|||||||
params.set("tab", `${id}`);
|
params.set("tab", `${id}`);
|
||||||
const newUrl = location.pathname + "?" + params.toString();
|
const newUrl = location.pathname + "?" + params.toString();
|
||||||
window.history.pushState({}, '', newUrl);
|
window.history.pushState({}, '', newUrl);
|
||||||
setUrlParams(params);
|
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [location.pathname]);
|
}, [location.pathname]);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user