feat(flash board): add SWF posting support (#1145)

This commit is contained in:
Tommaso Casaburi
2026-05-30 16:07:41 +07:00
committed by GitHub
parent 56894700c1
commit 9b3a95dd95
69 changed files with 1372 additions and 63 deletions
+23
View File
@@ -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;