pl-fe: use more specific zustand selectors
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@@ -7,7 +7,7 @@ import Avatar from 'pl-fe/components/ui/avatar';
|
||||
import HStack from 'pl-fe/components/ui/hstack';
|
||||
import Icon from 'pl-fe/components/ui/icon';
|
||||
import { useDraggedFiles } from 'pl-fe/hooks/use-dragged-files';
|
||||
import { useModalsStore } from 'pl-fe/stores/modals';
|
||||
import { useModalsActions } from 'pl-fe/stores/modals';
|
||||
|
||||
const messages = defineMessages({
|
||||
changeDescriptionHeading: { id: 'group.upload_avatar.alt.heading', defaultMessage: 'Change avatar description' },
|
||||
@@ -28,7 +28,7 @@ interface IMediaInput {
|
||||
const AvatarPicker = React.forwardRef<HTMLInputElement, IMediaInput>(({
|
||||
className, src, onChange, accept, disabled, description, onChangeDescription,
|
||||
}, ref) => {
|
||||
const { openModal } = useModalsStore();
|
||||
const { openModal } = useModalsActions();
|
||||
const intl = useIntl();
|
||||
|
||||
const picker = useRef<HTMLLabelElement>(null);
|
||||
|
||||
@@ -8,7 +8,7 @@ import Icon from 'pl-fe/components/ui/icon';
|
||||
import IconButton from 'pl-fe/components/ui/icon-button';
|
||||
import Text from 'pl-fe/components/ui/text';
|
||||
import { useDraggedFiles } from 'pl-fe/hooks/use-dragged-files';
|
||||
import { useModalsStore } from 'pl-fe/stores/modals';
|
||||
import { useModalsActions } from 'pl-fe/stores/modals';
|
||||
|
||||
const messages = defineMessages({
|
||||
title: { id: 'group.upload_banner.title', defaultMessage: 'Upload background picture' },
|
||||
@@ -30,7 +30,7 @@ interface IMediaInput {
|
||||
const HeaderPicker = React.forwardRef<HTMLInputElement, IMediaInput>(({
|
||||
src, onChange, onClear, accept, disabled, description, onChangeDescription,
|
||||
}, ref) => {
|
||||
const { openModal } = useModalsStore();
|
||||
const { openModal } = useModalsActions();
|
||||
const intl = useIntl();
|
||||
|
||||
const picker = useRef<HTMLLabelElement>(null);
|
||||
|
||||
Reference in New Issue
Block a user