mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat(flash board): add SWF posting support (#1145)
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { getFlashTagOptionFromComment, isFlashDirectory } from '../lib/flash-tags';
|
||||
import type { DirectoryCommunity } from '../lib/utils/directory-list-utils';
|
||||
import styles from '../views/post/post.module.css';
|
||||
|
||||
interface PostFlashTagProps {
|
||||
comment: unknown;
|
||||
directory: DirectoryCommunity | undefined;
|
||||
}
|
||||
|
||||
const PostFlashTag = ({ comment, directory }: PostFlashTagProps) => {
|
||||
if (!isFlashDirectory(directory)) return null;
|
||||
|
||||
const tag = getFlashTagOptionFromComment(comment);
|
||||
if (!tag) return null;
|
||||
|
||||
return (
|
||||
<span className={styles.flashTag} title={tag.label}>
|
||||
[{tag.shortLabel}]{' '}
|
||||
</span>
|
||||
);
|
||||
};
|
||||
|
||||
export default PostFlashTag;
|
||||
Reference in New Issue
Block a user