2
0

fix(e2e): 🐛 Pass tests

This commit is contained in:
Baptiste Arnaud
2022-05-14 11:53:03 -07:00
parent 4d9796c559
commit 731e646377
3 changed files with 3 additions and 2 deletions

View File

@ -55,6 +55,7 @@ export const FolderContent = ({ folder }: Props) => {
position: 'top-right', position: 'top-right',
status: 'error', status: 'error',
}) })
const { const {
folders, folders,
isLoading: isFolderLoading, isLoading: isFolderLoading,

View File

@ -51,7 +51,7 @@ export const WorkspaceContext = ({ children }: { children: ReactNode }) => {
)?.role )?.role
useEffect(() => { useEffect(() => {
if (!workspaces || workspaces.length === 0) return if (!workspaces || workspaces.length === 0 || currentWorkspace) return
const lastWorspaceId = localStorage.getItem('workspaceId') const lastWorspaceId = localStorage.getItem('workspaceId')
const defaultWorkspace = lastWorspaceId const defaultWorkspace = lastWorspaceId
? workspaces.find(byId(lastWorspaceId)) ? workspaces.find(byId(lastWorspaceId))
@ -105,6 +105,7 @@ export const WorkspaceContext = ({ children }: { children: ReactNode }) => {
mutate({ mutate({
workspaces: [...workspaces, newWorkspace], workspaces: [...workspaces, newWorkspace],
}) })
console.log(newWorkspace)
setCurrentWorkspace(newWorkspace) setCurrentWorkspace(newWorkspace)
} }

View File

@ -19,7 +19,6 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
where: { name: domain }, where: { name: domain },
}) })
await deleteDomainOnVercel(domain)
return res.send({ customDomains }) return res.send({ customDomains })
} }
return methodNotAllowed(res) return methodNotAllowed(res)