diff --git a/src/app/index.tsx b/src/app/index.tsx
index 52bf22f..64559f4 100644
--- a/src/app/index.tsx
+++ b/src/app/index.tsx
@@ -19,8 +19,8 @@ export const App = () => {
+
{user.displayName}
{variant === 'xs' && (
-
- {user.username}
-
+ {user.username}
)}
{isTopicStarter && (
diff --git a/src/lib/utils.ts b/src/lib/utils.ts
index 7ac0371..169996a 100644
--- a/src/lib/utils.ts
+++ b/src/lib/utils.ts
@@ -90,14 +90,5 @@ export const getTimeSince = (timestamp: string | Date): string => {
};
export const hash = (input: string) => {
- let hash = 0,
- i,
- chr;
- if (input.length === 0) return hash;
- for (i = 0; i < input.length; i++) {
- chr = input.charCodeAt(i);
- hash = (hash << 5) - hash + chr;
- hash |= 0;
- }
- return hash;
+ return input.split('').reduce((a, b) => ((a << 5) - a + b.charCodeAt(0)) | 0, 0);
};
diff --git a/src/pages/edit-profile/page.tsx b/src/pages/edit-profile/page.tsx
index dab7c95..f5e4763 100644
--- a/src/pages/edit-profile/page.tsx
+++ b/src/pages/edit-profile/page.tsx
@@ -1,5 +1,4 @@
import {useForm} from 'effector-forms';
-import {useUnit} from 'effector-react';
import {Profile} from '~/features/profile';
@@ -7,13 +6,11 @@ import {UserEntity} from '~/entities/types';
import {Container, ContainerSize, CustomButton, Input, Page, Text, TextSize} from '~/shared/ui';
-import {$form, avatarFileChanged} from './model';
+import {$form} from './model';
import cls from './page.module.scss';
export const EditProfilePage = () => {
const {fields, eachValid, submit} = useForm($form);
- const onAvatarFileChanged = useUnit(avatarFileChanged);
-
return (