mirror of
https://github.com/baptisteArno/typebot.io.git
synced 2026-06-16 21:10:26 +08:00
refactor(domain): ♿ Improve format feedback
This commit is contained in:
parent
d756dff99e
commit
90e837e7c2
@ -177,6 +177,7 @@ export const CustomDomainModal = ({
|
||||
const splitHostname = (
|
||||
hostname: string
|
||||
): { domain: string; type: string; subdomain: string } | undefined => {
|
||||
if (!hostname.includes('.')) return
|
||||
const urlParts = /([a-z-0-9]{2,63}).([a-z.]{2,5})$/.exec(hostname)
|
||||
if (!urlParts) return
|
||||
const [, domain, type] = urlParts
|
||||
|
||||
Loading…
Reference in New Issue
Block a user