refactor(domain): ♿ Improve format feedback
This commit is contained in:
@@ -177,6 +177,7 @@ export const CustomDomainModal = ({
|
|||||||
const splitHostname = (
|
const splitHostname = (
|
||||||
hostname: string
|
hostname: string
|
||||||
): { domain: string; type: string; subdomain: string } | undefined => {
|
): { 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)
|
const urlParts = /([a-z-0-9]{2,63}).([a-z.]{2,5})$/.exec(hostname)
|
||||||
if (!urlParts) return
|
if (!urlParts) return
|
||||||
const [, domain, type] = urlParts
|
const [, domain, type] = urlParts
|
||||||
|
|||||||
Reference in New Issue
Block a user