perf(e2e): ⚡️ Migrate to Playwright
This commit is contained in:
@@ -7,7 +7,6 @@ export const SendIcon = (props: React.SVGProps<SVGSVGElement>) => (
|
||||
width="19px"
|
||||
{...props}
|
||||
>
|
||||
<title>Send</title>
|
||||
<path d="M476.59 227.05l-.16-.07L49.35 49.84A23.56 23.56 0 0027.14 52 24.65 24.65 0 0016 72.59v113.29a24 24 0 0019.52 23.57l232.93 43.07a4 4 0 010 7.86L35.53 303.45A24 24 0 0016 327v113.31A23.57 23.57 0 0026.59 460a23.94 23.94 0 0013.22 4 24.55 24.55 0 009.52-1.93L476.4 285.94l.19-.09a32 32 0 000-58.8z" />
|
||||
</svg>
|
||||
)
|
||||
|
||||
@@ -52,6 +52,7 @@ export const TypebotViewer = ({
|
||||
{typebot.theme?.customCss}
|
||||
</style>
|
||||
}
|
||||
name="Typebot viewer"
|
||||
style={{ width: '100%', height: '100%', border: 'none' }}
|
||||
>
|
||||
<style
|
||||
|
||||
@@ -1,4 +1,22 @@
|
||||
import { NextApiResponse } from 'next'
|
||||
import { NextApiRequest, NextApiResponse } from 'next'
|
||||
|
||||
export const methodNotAllowed = (res: NextApiResponse) =>
|
||||
res.status(405).json({ message: 'Method Not Allowed' })
|
||||
|
||||
export const initMiddleware =
|
||||
(
|
||||
handler: (
|
||||
req: NextApiRequest,
|
||||
res: NextApiResponse,
|
||||
middleware: (result: any) => void
|
||||
) => void
|
||||
) =>
|
||||
(req: any, res: any) =>
|
||||
new Promise((resolve, reject) => {
|
||||
handler(req, res, (result) => {
|
||||
if (result instanceof Error) {
|
||||
return reject(result)
|
||||
}
|
||||
return resolve(result)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user