mirror of
https://github.com/uetchy/namae.git
synced 2025-07-01 22:10:04 +09:00
fix: api folder name, message and normalize rules
This commit is contained in:
parent
629a5351b3
commit
9bc32ffd16
@ -8,14 +8,14 @@ import { Card, Repeater, DedicatedAvailability } from '../core';
|
||||
const SubredditCard: React.FC<{ query: string }> = ({ query }) => {
|
||||
const { t } = useTranslation();
|
||||
const normalizedQuery = normalize(query, {
|
||||
allowUnderscore: false,
|
||||
allowUnderscore: true,
|
||||
});
|
||||
const lowerCase = normalizedQuery.toLowerCase();
|
||||
|
||||
const names = [normalizedQuery];
|
||||
const moreNames = [
|
||||
`get${lowerCase}`,
|
||||
`${lowerCase}-team`,
|
||||
`${lowerCase}_team`,
|
||||
];
|
||||
|
||||
return (
|
||||
@ -25,6 +25,7 @@ const SubredditCard: React.FC<{ query: string }> = ({ query }) => {
|
||||
<DedicatedAvailability
|
||||
name={name}
|
||||
service="reddit" // route to http://namae.dev/api/services/reddit/<query> which is /api/services/reddit/[query].ts on GitHub
|
||||
message={`Go to reddit.com/r/${name}`}
|
||||
link={`https://reddit.com/r/${name}`}
|
||||
prefix="reddit.com/r/"
|
||||
icon={<FaReddit />}
|
||||
|
Loading…
x
Reference in New Issue
Block a user