mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
feat(webapp): sign-up restrictions
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
import { useMutation } from 'react-query';
|
||||
import useApiRequest from '../useRequest';
|
||||
import { setCookie } from '../../utils';
|
||||
import { useRequestQuery } from '../useQueryRequest';
|
||||
import t from './types';
|
||||
|
||||
/**
|
||||
* Saves the response data to cookies.
|
||||
@@ -70,3 +72,21 @@ export const useAuthResetPassword = (props) => {
|
||||
props,
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Fetches the authentication page metadata.
|
||||
*/
|
||||
export const useAuthMetadata = (props) => {
|
||||
return useRequestQuery(
|
||||
[t.AUTH_METADATA_PAGE,],
|
||||
{
|
||||
method: 'get',
|
||||
url: `auth/meta`,
|
||||
},
|
||||
{
|
||||
select: (res) => res.data,
|
||||
defaultData: {},
|
||||
...props,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
// @ts-nocheck
|
||||
const Authentication = {
|
||||
AUTH_METADATA_PAGE: 'AUTH_META_PAGE'
|
||||
}
|
||||
|
||||
const ACCOUNTS = {
|
||||
ACCOUNT: 'ACCOUNT',
|
||||
ACCOUNT_TRANSACTION: 'ACCOUNT_TRANSACTION',
|
||||
@@ -217,6 +221,7 @@ const DASHBOARD = {
|
||||
};
|
||||
|
||||
export default {
|
||||
...Authentication,
|
||||
...ACCOUNTS,
|
||||
...BILLS,
|
||||
...VENDORS,
|
||||
|
||||
Reference in New Issue
Block a user