Skip to content

Commit

Permalink
Posts typed props
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Haynes committed Jan 3, 2024
1 parent c20cec5 commit 7a0a8e9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion apps/demos/src/Posts/Markdown.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Markdown from 'marked-react';

export function BWEComponent() {
interface Props {
content: string;
}

export function BWEComponent(props: Props) {
return <Markdown>{props.content}</Markdown>;
}
8 changes: 7 additions & 1 deletion apps/demos/src/Posts/Post.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
export function BWEComponent() {
interface Props {
account_id: string;
block_timestamp: number;
content: string;
}

export function BWEComponent(props: Props) {
const { content: contentRaw, account_id: author, block_timestamp } = props;

let content = 'bad content';
Expand Down

0 comments on commit 7a0a8e9

Please sign in to comment.