mirror of
https://github.com/uetchy/namae.git
synced 2025-07-02 06:20:02 +09:00
fix: use query
instead of name
This commit is contained in:
parent
8092ba0903
commit
4620d9498f
@ -4,11 +4,14 @@ import { FaReddit } from 'react-icons/fa';
|
|||||||
|
|
||||||
import { Card, Repeater, DedicatedAvailability } from '../core';
|
import { Card, Repeater, DedicatedAvailability } from '../core';
|
||||||
|
|
||||||
const SubredditCard: React.FC<{ query: string }> = ({ name }) => {
|
const SubredditCard: React.FC<{ query: string }> = ({ query }) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const lowerCase = name.toLowerCase();
|
const normalizedQuery = normalize(query, {
|
||||||
|
allowUnderscore: false,
|
||||||
|
});
|
||||||
|
const lowerCase = normalizedQuery.toLowerCase();
|
||||||
|
|
||||||
const names = [name];
|
const names = [normalizedQuery];
|
||||||
const moreNames = [
|
const moreNames = [
|
||||||
`get${lowerCase}`,
|
`get${lowerCase}`,
|
||||||
`${lowerCase}-team`,
|
`${lowerCase}-team`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user