mirror of
				https://github.com/mastermindzh/rickvanlieshout.com
				synced 2025-10-31 16:49:49 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			473 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			473 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| // @flow strict
 | |
| import React from 'react';
 | |
| import type { Entry, WidgetFor } from '../../types';
 | |
| 
 | |
| type Props = {
 | |
|   entry: Entry,
 | |
|   widgetFor: WidgetFor
 | |
| };
 | |
| 
 | |
| const PostPreview = ({ entry, widgetFor }: Props) => {
 | |
|   const body = widgetFor('body');
 | |
|   const title = entry.getIn(['data', 'title']);
 | |
| 
 | |
|   return (
 | |
|     <div className="post">
 | |
|       <h1 className="post__title">{title}</h1>
 | |
|       <div className="post__body">{body}</div>
 | |
|     </div>
 | |
|   );
 | |
| };
 | |
| 
 | |
| export default PostPreview;
 |