Rename useAccountWorkspace to useTeamAccountWorkspace
The function useAccountWorkspace has been renamed to useTeamAccountWorkspace to better reflect its usage and context. The corresponding references and related error message were also updated to ensure consistency.
This commit is contained in:
@@ -5,16 +5,16 @@ import { useContext } from 'react';
|
||||
import { TeamAccountWorkspaceContext } from '../components';
|
||||
|
||||
/**
|
||||
* @name useAccountWorkspace
|
||||
* @name useTeamAccountWorkspace
|
||||
* @description A hook to access the account workspace data.
|
||||
* @returns The account workspace data.
|
||||
*/
|
||||
export function useAccountWorkspace() {
|
||||
export function useTeamAccountWorkspace() {
|
||||
const ctx = useContext(TeamAccountWorkspaceContext);
|
||||
|
||||
if (!ctx) {
|
||||
throw new Error(
|
||||
'useAccountWorkspace must be used within a TeamAccountWorkspaceContext.Provider. This is only provided within the account workspace /home/[account]',
|
||||
'useTeamAccountWorkspace must be used within a TeamAccountWorkspaceContext.Provider. This is only provided within the account workspace /home/[account]',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user