mirror of
				https://github.com/mastermindzh/rickvanlieshout.com
				synced 2025-10-31 16:49:49 +01:00 
			
		
		
		
	refactor(starter): upgrade to new version of gatsby
This commit is contained in:
		
							
								
								
									
										45
									
								
								src/components/Sidebar/Author/Author.tsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								src/components/Sidebar/Author/Author.tsx
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,45 @@ | ||||
| import React from "react"; | ||||
|  | ||||
| import { Link, withPrefix } from "gatsby"; | ||||
|  | ||||
| import styles from "./Author.module.scss"; | ||||
|  | ||||
| type Props = { | ||||
|   author: { | ||||
|     name: string; | ||||
|     bio: string; | ||||
|     photo: string; | ||||
|   }; | ||||
|   isIndex?: boolean; | ||||
| }; | ||||
|  | ||||
| const Author = ({ author, isIndex }: Props) => ( | ||||
|   <div className={styles.author}> | ||||
|     <Link to="/"> | ||||
|       <img | ||||
|         src={withPrefix(author.photo)} | ||||
|         className={styles.author__photo} | ||||
|         width="75" | ||||
|         height="75" | ||||
|         alt={author.name} | ||||
|       /> | ||||
|     </Link> | ||||
|  | ||||
|     {isIndex === true ? ( | ||||
|       <h1 className={styles.author__title}> | ||||
|         <Link className={styles["author__title-link"]} to="/"> | ||||
|           {author.name} | ||||
|         </Link> | ||||
|       </h1> | ||||
|     ) : ( | ||||
|       <h2 className={styles.author__title}> | ||||
|         <Link className={styles["author__title-link"]} to="/"> | ||||
|           {author.name} | ||||
|         </Link> | ||||
|       </h2> | ||||
|     )} | ||||
|     <p className={styles.author__subtitle}>{author.bio}</p> | ||||
|   </div> | ||||
| ); | ||||
|  | ||||
| export default Author; | ||||
		Reference in New Issue
	
	Block a user