mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
fix add item no offer/needs error
This commit is contained in:
parent
b846c36906
commit
ca45cc9187
@ -17,8 +17,6 @@ export function LoginPage() {
|
|||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const onLogin = async () => {
|
const onLogin = async () => {
|
||||||
console.log(email);
|
|
||||||
console.log(password);
|
|
||||||
await toast.promise(
|
await toast.promise(
|
||||||
login({ email: email, password: password }),
|
login({ email: email, password: password }),
|
||||||
{
|
{
|
||||||
|
|||||||
@ -10,7 +10,7 @@ export default function AddButton({ triggerAction }: { triggerAction: React.Disp
|
|||||||
|
|
||||||
const canAddItems = () => {
|
const canAddItems = () => {
|
||||||
let canAdd = false;
|
let canAdd = false;
|
||||||
layers.map(layer => {
|
layers.map(layer => {
|
||||||
if (layer.api?.createItem && hasUserPermission(layer.api.collectionName!, "create")) canAdd = true;
|
if (layer.api?.createItem && hasUserPermission(layer.api.collectionName!, "create")) canAdd = true;
|
||||||
})
|
})
|
||||||
return canAdd;
|
return canAdd;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user