File tree Expand file tree Collapse file tree 4 files changed +32
-10
lines changed Expand file tree Collapse file tree 4 files changed +32
-10
lines changed Original file line number Diff line number Diff line change
1
+ type StoryAbstractProps = {
2
+ abstract : string
3
+ }
4
+
5
+ export default function StoryAbstract ( { abstract } : StoryAbstractProps ) {
6
+ return < div > { abstract } </ div >
7
+ }
Original file line number Diff line number Diff line change 1
1
import { graphql , useFragment } from 'react-relay'
2
2
import { StoryPreview_node$key } from '../../queries/__generated__/StoryPreview_node.graphql'
3
3
import Card from '../Card'
4
+ import StoryAbstract from './StoryAbstract'
5
+ import StoryPreviewFooter from './StoryPreviewFooter'
4
6
import UserSnippet from './UserSnippet'
5
7
6
8
type StoryPreviewProps = {
@@ -25,15 +27,15 @@ const StoryPreview = ({ story }: StoryPreviewProps) => {
25
27
)
26
28
27
29
return (
28
- < >
29
- < Card classes = "my-8 flex flex-col" >
30
- < UserSnippet user = { data . createdBy } / >
31
- < div className = "prose dark:text-gray-100" >
32
- < h3 className = "dark:text-gray-200" > { data . title } </ h3 >
33
- < p > { data . abstractContent } </ p >
34
- </ div >
35
- </ Card >
36
- </ >
30
+ < Card classes = "my-8 flex flex-col" >
31
+ < UserSnippet user = { data . createdBy } / >
32
+ < div className = "prose dark:text-gray-100" >
33
+ < h3 className = "dark:text-gray-200" > { data . title } </ h3 >
34
+ < p > { data . abstractContent } </ p >
35
+ </ div >
36
+ < StoryAbstract abstract = { data . abstractContent } / >
37
+ < StoryPreviewFooter / >
38
+ </ Card >
37
39
)
38
40
}
39
41
Original file line number Diff line number Diff line change
1
+ import { BiCommentDetail } from '@react-icons/all-files/bi/BiCommentDetail'
2
+ import { RiHeart3Fill } from '@react-icons/all-files/ri/RiHeart3Fill'
3
+ import { RiHeartLine } from '@react-icons/all-files/ri/RiHeartLine'
4
+ export default function StoryPreviewFooter ( ) {
5
+ return (
6
+ < div className = "flex flex-row items-center" >
7
+ < BiCommentDetail />
8
+ < span className = "text-sm" > 10 </ span >
9
+ < RiHeart3Fill />
10
+ < RiHeartLine />
11
+ </ div >
12
+ )
13
+ }
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ const UserSnippet = ({ user }: UserSnippetProps) => {
27
27
< img
28
28
src = { data . avatar }
29
29
alt = { `${ data . handle } 's avatar` }
30
- className = "w-12 h-12 rounded-sm "
30
+ className = "w-12 h-12 rounded-md "
31
31
/>
32
32
< div className = "flex flex-col mx-2" >
33
33
< div className = "flex flex-row" >
You can’t perform that action at this time.
0 commit comments