Skip to content

Commit

Permalink
Fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
joel-jeremy committed Jan 10, 2025
1 parent dc9d623 commit b23890b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getUserAccessErrors } from 'loot-core/shared/errors';
import { type UserAvailable } from 'loot-core/types/models';

import { useMetadataPref } from '../../../hooks/useMetadataPref';
import { useAppDispatch } from '../../../redux';
import { useDispatch } from '../../../redux';
import { theme } from '../../../style';
import { View } from '../../common/View';
import { Checkbox } from '../../forms';
Expand All @@ -23,7 +23,7 @@ type UserAccessProps = {
export const UserAccessRow = memo(
({ access, hovered, onHover }: UserAccessProps) => {
const { t } = useTranslation();
const dispatch = useAppDispatch();
const dispatch = useDispatch();

const backgroundFocus = hovered;
const [marked, setMarked] = useState(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
} from 'loot-core/types/models/user';

import { SelectedProvider, useSelected } from '../../../hooks/useSelected';
import { useAppDispatch } from '../../../redux';
import { useDispatch } from '../../../redux';
import { theme } from '../../../style';
import { Button } from '../../common/Button2';
import { Link } from '../../common/Link';
Expand Down Expand Up @@ -85,7 +85,7 @@ function UserDirectoryContent({
const [allUsers, setAllUsers] = useState([]);
const [page, setPage] = useState(0);
const [filter, setFilter] = useState('');
const dispatch = useAppDispatch();
const dispatch = useDispatch();

const { getUserDirectoryErrors } = useGetUserDirectoryErrors();

Expand Down
4 changes: 2 additions & 2 deletions packages/desktop-client/src/components/modals/EditAccess.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { getUserAccessErrors } from 'loot-core/shared/errors';
import { type Handlers } from 'loot-core/types/handlers';
import { type UserAccessEntity } from 'loot-core/types/models/userAccess';

import { useAppDispatch } from '../../redux';
import { useDispatch } from '../../redux';
import { styles, theme } from '../../style';
import { Button } from '../common/Button2';
import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal';
Expand All @@ -27,7 +27,7 @@ export function EditUserAccess({
onSave: originalOnSave,
}: EditUserAccessProps) {
const { t } = useTranslation();
const dispatch = useAppDispatch();
const dispatch = useDispatch();

const [userId, setUserId] = useState(defaultUserAccess.userId ?? '');
const [error, setSetError] = useState('');
Expand Down
6 changes: 3 additions & 3 deletions packages/desktop-client/src/components/modals/EditUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
type UserEntity,
} from 'loot-core/src/types/models/user';

import { useAppDispatch } from '../../redux';
import { useDispatch } from '../../redux';
import { styles, theme } from '../../style';
import { Button } from '../common/Button2';
import { Input } from '../common/Input';
Expand Down Expand Up @@ -75,7 +75,7 @@ function useGetUserDirectoryErrors() {

function useSaveUser() {
const { t } = useTranslation();
const dispatch = useAppDispatch();
const dispatch = useDispatch();
const { getUserDirectoryErrors } = useGetUserDirectoryErrors();

async function saveUser(
Expand Down Expand Up @@ -155,7 +155,7 @@ export function EditUserFinanceApp({

function EditUser({ defaultUser, onSave: originalOnSave }: EditUserProps) {
const { t } = useTranslation();
const dispatch = useAppDispatch();
const dispatch = useDispatch();

const [userName, setUserName] = useState<string>(defaultUser.userName ?? '');
const [displayName, setDisplayName] = useState<string>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as asyncStorage from 'loot-core/platform/server/asyncStorage';
import { getOpenIdErrors } from 'loot-core/shared/errors';
import { type OpenIdConfig } from 'loot-core/types/models/openid';

import { useAppDispatch } from '../../redux';
import { useDispatch } from '../../redux';
import { theme, styles } from '../../style';
import { Error } from '../alerts';
import { Button } from '../common/Button2';
Expand All @@ -25,7 +25,7 @@ export function OpenIDEnableModal({
onSave: originalOnSave,
}: OpenIDEnableModalProps) {
const { t } = useTranslation();
const dispatch = useAppDispatch();
const dispatch = useDispatch();

const [error, setError] = useState('');
const refreshLoginMethods = useRefreshLoginMethods();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { closeBudget, popModal } from 'loot-core/client/actions';
import { send } from 'loot-core/platform/client/fetch';
import * as asyncStorage from 'loot-core/src/platform/server/asyncStorage';

import { useAppDispatch } from '../../redux';
import { useDispatch } from '../../redux';
import { theme, styles } from '../../style';
import { Error as ErrorAlert } from '../alerts';
import { Button } from '../common/Button2';
Expand All @@ -31,7 +31,7 @@ export function PasswordEnableModal({
onSave: originalOnSave,
}: PasswordEnableModalProps) {
const { t } = useTranslation();
const dispatch = useAppDispatch();
const dispatch = useDispatch();

const [error, setError] = useState<string | null>(null);
const multiuserEnabled = useMultiuserEnabled();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2103,7 +2103,7 @@ function TransactionTableInner({
}

export const TransactionTable = forwardRef((props, ref) => {
const dispatch = useAppDispatch();
const dispatch = useDispatch();
const [newTransactions, setNewTransactions] = useState(null);
const [prevIsAdding, setPrevIsAdding] = useState(false);
const splitsExpanded = useSplitsExpanded();
Expand Down

0 comments on commit b23890b

Please sign in to comment.