mirror of
https://github.com/uetchy/namae.git
synced 2025-03-17 04:30:31 +09:00
fix: make domain hack suggestion lower case
This commit is contained in:
parent
d951652f85
commit
e923f80a47
@ -10,9 +10,12 @@ const DomainCard: React.FC<{query: string}> = ({query}) => {
|
||||
const lowerCase = query.toLowerCase();
|
||||
|
||||
const domainHackSuggestions = zones
|
||||
.map((zone) => new RegExp(`${zone}$`).exec(query))
|
||||
.map((zone) => new RegExp(`${zone}$`).exec(lowerCase))
|
||||
.filter((s): s is RegExpExecArray => s !== null)
|
||||
.map((m) => query.substring(0, m.index) + '.' + query.substring(m.index));
|
||||
.map(
|
||||
(m) =>
|
||||
lowerCase.substring(0, m.index) + '.' + lowerCase.substring(m.index),
|
||||
);
|
||||
|
||||
const names = [
|
||||
`${lowerCase}.com`,
|
||||
|
Loading…
x
Reference in New Issue
Block a user