Initial commit: Tapalka monorepo (bot, front, strapi)

This commit is contained in:
2026-05-21 11:54:44 +07:00
commit 9ec9485940
208 changed files with 58314 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
import { toast } from 'react-toastify';
interface IUseNotifyReturn {
getSuccessNotify: () => number | string;
getErrorNotifyByNickname: () => number | string;
getErrorNotifyByCount: () => number | string;
}
export function useNotify(): IUseNotifyReturn {
const getSuccessNotify = () => {
return toast.success('Заявка успешно создана!', {
position: 'top-left',
autoClose: 3000,
hideProgressBar: false,
closeOnClick: true,
pauseOnHover: true,
draggable: true,
style: { width: '250px', color: 'black', margin: '15px' },
progress: undefined,
theme: 'dark',
});
};
const getErrorNotifyByNickname = () => {
return toast.error('Вы не указали ваш никнейм!', {
position: 'top-left',
autoClose: 3000,
hideProgressBar: false,
closeOnClick: true,
pauseOnHover: true,
draggable: true,
style: { width: '250px', color: 'black', margin: '15px' },
progress: undefined,
theme: 'dark',
});
};
const getErrorNotifyByCount = () => {
return toast.error('Вы не можете выбрать количество равное 0!', {
position: 'top-left',
autoClose: 3000,
hideProgressBar: false,
closeOnClick: true,
pauseOnHover: true,
draggable: true,
style: { width: '250px', color: 'black', margin: '15px' },
progress: undefined,
theme: 'dark',
});
};
return { getSuccessNotify, getErrorNotifyByNickname, getErrorNotifyByCount };
}