mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
prepared attestation api
This commit is contained in:
parent
a5ccf7c6f1
commit
87f392e6e1
@ -4,12 +4,11 @@ import { useItems } from '../Map/hooks/useItems'
|
|||||||
import { useAssetApi } from '../AppShell/hooks/useAssets'
|
import { useAssetApi } from '../AppShell/hooks/useAssets'
|
||||||
import { EmojiPicker } from './EmojiPicker';
|
import { EmojiPicker } from './EmojiPicker';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { ColorPicker } from '../Profile/Subcomponents/ColorPicker';
|
|
||||||
import { useRef, useState } from 'react';
|
import { useRef, useState } from 'react';
|
||||||
import { Item, UserItem } from '../../types';
|
import { Item, ItemsApi } from '../../types';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
|
|
||||||
export const AttestationForm = () => {
|
export const AttestationForm = ({api}:{api:ItemsApi<any>}) => {
|
||||||
|
|
||||||
const items = useItems();
|
const items = useItems();
|
||||||
const assetsApi = useAssetApi();
|
const assetsApi = useAssetApi();
|
||||||
@ -35,6 +34,16 @@ export const AttestationForm = () => {
|
|||||||
setInputValue(event.target.value);
|
setInputValue(event.target.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const sendAttestation = async () => {
|
||||||
|
api.createItem && api.createItem({
|
||||||
|
text: inputValue,
|
||||||
|
symbol: "🔥",
|
||||||
|
color: "",
|
||||||
|
shape: "",
|
||||||
|
to: users
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user