feat(reply modal): add link type previewer, spoiler option

This commit is contained in:
Tom (plebeius.eth)
2024-05-31 15:45:48 +02:00
parent 8e6aca6e32
commit c5d55a9dd5
4 changed files with 38 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
export { default } from './post-form';
export { LinkTypePreviewer, default } from './post-form';
+1 -1
View File
@@ -54,7 +54,7 @@ const useSubmitStore = create<SubmitState>((set) => ({
resetSubmitStore: () => set({ subplebbitAddress: undefined, title: undefined, content: undefined, link: undefined, publishCommentOptions: {} }),
}));
const LinkTypePreviewer = ({ link }: { link: string }) => {
export const LinkTypePreviewer = ({ link }: { link: string }) => {
const mediaInfo = getLinkMediaInfo(link);
return isValidURL(link) ? mediaInfo?.type : 'Invalid URL';
};