@licklist/design 0.78.20 → 0.78.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,7 @@ function UserNavDropDown() {
10
10
  var navigate = useNavigate();
11
11
  var onLogoutHandler = function() {
12
12
  user.logout();
13
- navigate('/');
13
+ navigate('/login');
14
14
  };
15
15
  return /*#__PURE__*/ jsx(Dropdown.Item, {
16
16
  eventKey: "1",
@@ -1 +1 @@
1
- {"version":3,"file":"LoginComponent.d.ts","sourceRoot":"","sources":["../../../src/auth/Login/LoginComponent.tsx"],"names":[],"mappings":"AAqBA,KAAK,mBAAmB,GAAG;IACzB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,QAAA,MAAM,cAAc,GAAI,sCAGrB,mBAAmB,4CAgHrB,CAAA;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
1
+ {"version":3,"file":"LoginComponent.d.ts","sourceRoot":"","sources":["../../../src/auth/Login/LoginComponent.tsx"],"names":[],"mappings":"AAqBA,KAAK,mBAAmB,GAAG;IACzB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,QAAA,MAAM,cAAc,GAAI,sCAGrB,mBAAmB,4CAkHrB,CAAA;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
@@ -6,7 +6,7 @@ import { useTranslation, Trans } from 'react-i18next';
6
6
  import { useNavigate, Link } from 'react-router-dom';
7
7
  import RequestContext from '@licklist/plugins/dist/context/app/RequestContext';
8
8
  import useUserApi from '@licklist/plugins/dist/hooks/Api/useUserApi';
9
- import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification';
9
+ import useAlert from '@licklist/plugins/dist/context/app/hooks/useAlert';
10
10
  import useAuth from '@licklist/plugins/dist/context/user/hooks/useAuth';
11
11
  import useUser from '@licklist/plugins/dist/context/user/hooks/useUser';
12
12
  import useInvite from '@licklist/plugins/dist/context/user/hooks/useInvite';
@@ -194,7 +194,7 @@ var LoginComponent = function(param) {
194
194
  'User'
195
195
  ]).t;
196
196
  var request = useContext(RequestContext);
197
- var notification = useNotification();
197
+ var showAlert = useAlert().showAlert;
198
198
  var auth = useAuth();
199
199
  var user = useUser();
200
200
  var invite = useInvite();
@@ -202,9 +202,10 @@ var LoginComponent = function(param) {
202
202
  var _useState = _sliced_to_array(useState(false), 2), isLoading = _useState[0], setIsLoading = _useState[1];
203
203
  var userApiService = useUserApi(request);
204
204
  var handleError = function(error) {
205
- notification.danger({
206
- title: 'Error',
207
- message: error.message
205
+ showAlert({
206
+ type: 'error',
207
+ message: error.message,
208
+ mount: 'container'
208
209
  });
209
210
  };
210
211
  var storeSecrets = function(secrets) {
@@ -271,7 +272,8 @@ var LoginComponent = function(param) {
271
272
  // Store user profile
272
273
  user.login(profile.data);
273
274
  invite.clearInvitation();
274
- notification.success({
275
+ showAlert({
276
+ type: 'success',
275
277
  title: 'Success',
276
278
  message: t('Notification:loggedSuccessfully')
277
279
  });
@@ -14,7 +14,7 @@ var Logout = function() {
14
14
  var navigate = useNavigate();
15
15
  useEffect(function() {
16
16
  user.logout();
17
- navigate('/');
17
+ navigate('/login');
18
18
  }, [
19
19
  navigate,
20
20
  user
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.78.20",
3
+ "version": "0.78.21",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -44,7 +44,7 @@
44
44
  "peerDependencies": {
45
45
  "@licklist/core": "0.36.6",
46
46
  "@licklist/eslint-config": "0.5.6",
47
- "@licklist/plugins": "0.36.5",
47
+ "@licklist/plugins": "0.36.10",
48
48
  "clsx": "2.1.1",
49
49
  "i18next": "25.3.2",
50
50
  "lodash": "4.17.21",
@@ -66,7 +66,7 @@
66
66
  "@fortawesome/free-solid-svg-icons": "5.15.2",
67
67
  "@licklist/core": "0.36.6",
68
68
  "@licklist/eslint-config": "0.5.6",
69
- "@licklist/plugins": "0.36.5",
69
+ "@licklist/plugins": "0.36.10",
70
70
  "@mantine/core": "6.0.22",
71
71
  "@mantine/hooks": "6.0.22",
72
72
  "@mdx-js/react": "1.6.22",
@@ -11,7 +11,7 @@ function UserNavDropDown() {
11
11
  const onLogoutHandler = () => {
12
12
  user.logout()
13
13
 
14
- navigate('/')
14
+ navigate('/login')
15
15
  }
16
16
 
17
17
  return (
@@ -5,7 +5,7 @@ import { Trans, useTranslation } from 'react-i18next'
5
5
  import { Link, useNavigate } from 'react-router-dom'
6
6
  import RequestContext from '@licklist/plugins/dist/context/app/RequestContext'
7
7
  import useUserApi from '@licklist/plugins/dist/hooks/Api/useUserApi'
8
- import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification'
8
+ import useAlert from "@licklist/plugins/dist/context/app/hooks/useAlert";
9
9
  import useAuth from '@licklist/plugins/dist/context/user/hooks/useAuth'
10
10
  import useUser from '@licklist/plugins/dist/context/user/hooks/useUser'
11
11
  import useInvite from '@licklist/plugins/dist/context/user/hooks/useInvite'
@@ -30,7 +30,7 @@ const LoginComponent = ({
30
30
  }: LoginComponentProps) => {
31
31
  const { t } = useTranslation(['Notification', 'User'])
32
32
  const request = useContext(RequestContext)
33
- const notification = useNotification()
33
+ const { showAlert } = useAlert();
34
34
  const auth = useAuth()
35
35
  const user = useUser()
36
36
  const invite = useInvite()
@@ -42,9 +42,10 @@ const LoginComponent = ({
42
42
  const userApiService = useUserApi(request)
43
43
 
44
44
  const handleError = (error: any) => {
45
- notification.danger({
46
- title: 'Error',
45
+ showAlert({
46
+ type: 'error',
47
47
  message: error.message,
48
+ mount: 'container',
48
49
  })
49
50
  }
50
51
 
@@ -82,7 +83,8 @@ const LoginComponent = ({
82
83
  user.login(profile.data as IUser)
83
84
  invite.clearInvitation()
84
85
 
85
- notification.success({
86
+ showAlert({
87
+ type: 'success',
86
88
  title: 'Success',
87
89
  message: t('Notification:loggedSuccessfully'),
88
90
  })
@@ -9,7 +9,7 @@ export const Logout = () => {
9
9
 
10
10
  useEffect(() => {
11
11
  user.logout()
12
- navigate('/')
12
+ navigate('/login')
13
13
  }, [navigate, user])
14
14
 
15
15
  return <BlockLoader />