2
0

🐛 (limits) Fix storage limit trigger and e2e tests

This commit is contained in:
Baptiste Arnaud
2022-09-24 08:58:23 +02:00
committed by Baptiste Arnaud
parent 1e26703ad4
commit 30dff2d5d7
52 changed files with 1024 additions and 2205 deletions

View File

@@ -1,7 +1,7 @@
import { WorkspaceWithMembers } from 'contexts/WorkspaceContext'
import { Plan, Workspace } from 'db'
import useSWR from 'swr'
import { isNotDefined, sendRequest } from 'utils'
import { isDefined, isNotDefined, sendRequest } from 'utils'
import { fetcher } from '../utils'
export const useWorkspaces = ({ userId }: { userId?: string }) => {
@@ -74,3 +74,6 @@ export const planToReadable = (plan?: Plan) => {
export const isFreePlan = (workspace?: Pick<Workspace, 'plan'>) =>
isNotDefined(workspace) || workspace?.plan === Plan.FREE
export const isWorkspaceProPlan = (workspace?: Pick<Workspace, 'plan'>) =>
isDefined(workspace) && workspace.plan === Plan.PRO