pl-fe: use more specific zustand selectors

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2025-10-22 21:42:11 +02:00
parent 80654146a2
commit ea86246647
93 changed files with 398 additions and 349 deletions

View File

@@ -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);

View File

@@ -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);