pl-fe: use more specific zustand selectors
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -4,7 +4,7 @@ import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
||||
import Button from 'pl-fe/components/ui/button';
|
||||
import { useAppSelector } from 'pl-fe/hooks/use-app-selector';
|
||||
import { useJoinEventMutation, useLeaveEventMutation } from 'pl-fe/queries/statuses/use-event-interactions';
|
||||
import { useModalsStore } from 'pl-fe/stores/modals';
|
||||
import { useModalsActions } from 'pl-fe/stores/modals';
|
||||
|
||||
import type { ButtonThemes } from 'pl-fe/components/ui/button/useButtonStyles';
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers/status';
|
||||
@ -23,7 +23,7 @@ interface IEventAction {
|
||||
const EventActionButton: React.FC<IEventAction> = ({ status, theme = 'secondary' }) => {
|
||||
const intl = useIntl();
|
||||
|
||||
const { openModal } = useModalsStore();
|
||||
const { openModal } = useModalsActions();
|
||||
const me = useAppSelector((state) => state.me);
|
||||
|
||||
const { mutate: joinEvent } = useJoinEventMutation(status.id);
|
||||
|
||||
@ -24,7 +24,7 @@ import { useOwnAccount } from 'pl-fe/hooks/use-own-account';
|
||||
import { useSettings } from 'pl-fe/hooks/use-settings';
|
||||
import { useChats } from 'pl-fe/queries/chats';
|
||||
import { useBookmarkStatus, usePinStatus, useReblogStatus, useUnbookmarkStatus, useUnpinStatus, useUnreblogStatus } from 'pl-fe/queries/statuses/use-status-interactions';
|
||||
import { useModalsStore } from 'pl-fe/stores/modals';
|
||||
import { useModalsActions } from 'pl-fe/stores/modals';
|
||||
import copy from 'pl-fe/utils/copy';
|
||||
import { download } from 'pl-fe/utils/download';
|
||||
import { shortNumberFormat } from 'pl-fe/utils/numbers';
|
||||
@ -80,7 +80,7 @@ const EventHeader: React.FC<IEventHeader> = ({ status }) => {
|
||||
const dispatch = useAppDispatch();
|
||||
const history = useHistory();
|
||||
|
||||
const { openModal } = useModalsStore();
|
||||
const { openModal } = useModalsActions();
|
||||
const { getOrCreateChatByAccountId } = useChats();
|
||||
|
||||
const features = useFeatures();
|
||||
|
||||
Reference in New Issue
Block a user