1
0
mirror of https://github.com/uetchy/namae.git synced 2025-08-20 18:08:11 +09:00

chore: update analytics

This commit is contained in:
2020-03-07 12:06:55 +09:00
parent ea61ecc9dc
commit 095895f7cf
3 changed files with 16 additions and 12 deletions

View File

@@ -7,10 +7,10 @@ import BarLoader from 'react-spinners/BarLoader';
import {GoInfo} from 'react-icons/go';
import {IoIosFlash} from 'react-icons/io';
import {useTranslation} from 'react-i18next';
import {sendError, sendExpandEvent} from '../../util/analytics';
import {OutboundLink} from 'react-ga';
import {sendError, sendExpandEvent} from '../../util/analytics';
import {mobile} from '../../util/css';
import {ExternalLink} from '../Links';
const COLORS = {
available: '#6e00ff',
@@ -210,7 +210,12 @@ export const Result: React.FC<{
<ResultIcon>{icon}</ResultIcon>
<ResultName>
{link ? (
<ExternalLink href={link}>{content}</ExternalLink>
<OutboundLink
to={link}
eventLabel={link.split('/')[2]}
target="_blank">
{content}
</OutboundLink>
) : (
content
)}

View File

@@ -20,7 +20,7 @@ const Search: React.FC<{query: string}> = ({query}) => {
id: string;
}>;
};
const repos = response.items;
const repos = response.items || [];
return (
<>