diff --git a/QandA/frontend/src/Question.tsx b/QandA/frontend/src/Question.tsx index 539b8fe..29f835b 100644 --- a/QandA/frontend/src/Question.tsx +++ b/QandA/frontend/src/Question.tsx @@ -1,3 +1,7 @@ +/** @jsxImportSource @emotion/react */ +import { css } from '@emotion/react'; +import { gray2, gray3 } from './Styles'; + import React from 'react'; import { QuestionData } from './QuestionsData'; @@ -8,15 +12,34 @@ interface Props { export const Question = ({ data, showContent }: Props) => (
-
{data.title}
+
+ {data.title} +
{showContent && ( -
+
{data.content.length > 50 ? `${data.content.substring(0, 50)}` : data.content}
)} -
+
{`Ask by ${ data.userName } on ${data.created.toLocaleDateString()} ${data.created.toLocaleTimeString()}`}