|
@@ -3,6 +3,7 @@ import React, {
|
|
|
} from 'react';
|
|
} from 'react';
|
|
|
|
|
|
|
|
import { useTranslation } from 'next-i18next';
|
|
import { useTranslation } from 'next-i18next';
|
|
|
|
|
+import Link from 'next/link';
|
|
|
|
|
|
|
|
import { IDataTagCount } from '~/interfaces/tag';
|
|
import { IDataTagCount } from '~/interfaces/tag';
|
|
|
|
|
|
|
@@ -33,14 +34,17 @@ const TagList: FC<TagListProps> = (props:(TagListProps & typeof defaultProps)) =
|
|
|
const tagListClasses: string = index === 0 ? 'list-group-item d-flex' : 'list-group-item d-flex border-top-0';
|
|
const tagListClasses: string = index === 0 ? 'list-group-item d-flex' : 'list-group-item d-flex border-top-0';
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
- <a
|
|
|
|
|
|
|
+ <Link
|
|
|
key={tag._id}
|
|
key={tag._id}
|
|
|
href={`/_search?q=tag:${encodeURIComponent(tag.name)}`}
|
|
href={`/_search?q=tag:${encodeURIComponent(tag.name)}`}
|
|
|
- className={tagListClasses}
|
|
|
|
|
>
|
|
>
|
|
|
- <div className="text-truncate list-tag-name">{tag.name}</div>
|
|
|
|
|
- <div className="ml-4 my-auto py-1 px-2 list-tag-count badge badge-secondary text-white">{tag.count}</div>
|
|
|
|
|
- </a>
|
|
|
|
|
|
|
+ <a
|
|
|
|
|
+ className={tagListClasses}
|
|
|
|
|
+ >
|
|
|
|
|
+ <div className="text-truncate list-tag-name">{tag.name}</div>
|
|
|
|
|
+ <div className="ml-4 my-auto py-1 px-2 list-tag-count badge badge-secondary text-white">{tag.count}</div>
|
|
|
|
|
+ </a>
|
|
|
|
|
+ </Link>
|
|
|
);
|
|
);
|
|
|
});
|
|
});
|
|
|
}, []);
|
|
}, []);
|