Skip to content

Commit bdbd1a6

Browse files
committed
Modified placement of date in story description
1 parent f17ee3d commit bdbd1a6

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/pages/Story.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,18 @@ const Story = (props) => {
134134
fill='#42779B'
135135
/>
136136
</svg>
137-
<h2>{story.Title}</h2>
137+
<span>
138+
<h2 style={{ marginBlockEnd: '0px' }}>{story.Title}</h2>
139+
<br />
140+
<h4 style={{ marginBlockStart: '0px' }}>
141+
Created At:{' '}
142+
{new Date(story.createdAt).toLocaleDateString(undefined, {
143+
year: 'numeric',
144+
month: 'long',
145+
day: 'numeric'
146+
})}
147+
</h4>
148+
</span>
138149
<div className='author-information'>
139150
<h4>
140151
By:{' '}
@@ -177,14 +188,6 @@ const Story = (props) => {
177188
</>
178189
}
179190
</div>
180-
<h4>
181-
Created At:{' '}
182-
{new Date(story.createdAt).toLocaleDateString(undefined, {
183-
year: 'numeric',
184-
month: 'long',
185-
day: 'numeric'
186-
})}
187-
</h4>
188191
</div>
189192
</div>
190193

0 commit comments

Comments
 (0)