Migrate to external library for interacting with API
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
@ -104,7 +104,7 @@ const EventHeader: React.FC<IEventHeader> = ({ status }) => {
|
||||
};
|
||||
|
||||
const handleExportClick = () => {
|
||||
dispatch(fetchEventIcs(status.id)).then(({ data }) => {
|
||||
dispatch(fetchEventIcs(status.id)).then((data) => {
|
||||
download(data, 'calendar.ics');
|
||||
}).catch(() => {});
|
||||
};
|
||||
@ -152,7 +152,7 @@ const EventHeader: React.FC<IEventHeader> = ({ status }) => {
|
||||
|
||||
const handleChatClick = () => {
|
||||
getOrCreateChatByAccountId(account.id)
|
||||
.then(({ json: chat }) => history.push(`/chats/${chat.id}`))
|
||||
.then((chat) => history.push(`/chats/${chat.id}`))
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
|
||||
@ -147,7 +147,7 @@ const EventInformation: React.FC<IEventInformation> = ({ params }) => {
|
||||
}, [status]);
|
||||
|
||||
const renderLinks = useCallback(() => {
|
||||
if (!status.event?.links.size) return null;
|
||||
if (!status.event?.links?.size) return null;
|
||||
|
||||
return (
|
||||
<Stack space={1}>
|
||||
@ -189,7 +189,7 @@ const EventInformation: React.FC<IEventInformation> = ({ params }) => {
|
||||
|
||||
<StatusMedia status={status} />
|
||||
|
||||
{status.quote && status.pleroma.get('quote_visible', true) && (
|
||||
{status.quote && (status.quote_visible ?? true) && (
|
||||
<QuotedStatus statusId={status.quote as string} />
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user