pl-fe: migrate /api/v*/instance to tanstack query
Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
import React, { useRef } from 'react';
|
||||
import { defineMessages, IntlShape, useIntl } from 'react-intl';
|
||||
|
||||
import { useInstance } from 'pl-fe/api/hooks/instance/use-instance';
|
||||
import IconButton from 'pl-fe/components/ui/icon-button';
|
||||
import { useInstance } from 'pl-fe/hooks/use-instance';
|
||||
|
||||
const messages = defineMessages({
|
||||
upload: { id: 'upload_button.label', defaultMessage: 'Add media attachment' },
|
||||
@ -32,7 +32,7 @@ const UploadButton: React.FC<IUploadButton> = ({
|
||||
icon,
|
||||
}) => {
|
||||
const intl = useIntl();
|
||||
const { configuration } = useInstance();
|
||||
const { configuration } = useInstance().data;
|
||||
|
||||
const fileElement = useRef<HTMLInputElement>(null);
|
||||
const attachmentTypes = configuration.media_attachments.supported_mime_types;
|
||||
|
||||
Reference in New Issue
Block a user