1
0
mirror of https://github.com/uetchy/namae.git synced 2025-07-01 22:10:04 +09:00

fix: use query instead of name

This commit is contained in:
Arnaud Lier 2022-03-09 17:18:42 +01:00 committed by GitHub
parent 8092ba0903
commit 4620d9498f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,11 +4,14 @@ import { FaReddit } from 'react-icons/fa';
import { Card, Repeater, DedicatedAvailability } from '../core';
const SubredditCard: React.FC<{ query: string }> = ({ name }) => {
const SubredditCard: React.FC<{ query: string }> = ({ query }) => {
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 = [
`get${lowerCase}`,
`${lowerCase}-team`,