소스 검색

clean code

Yuki Takei 3 년 전
부모
커밋
3b948fedf9
1개의 변경된 파일3개의 추가작업 그리고 4개의 파일을 삭제
  1. 3 4
      packages/presentation/src/components/Sections.tsx

+ 3 - 4
packages/presentation/src/components/Sections.tsx

@@ -35,10 +35,9 @@ export const Sections = (props: SectionsProps): JSX.Element => {
       <Head>
         <style>{css}</style>
       </Head>
-      { children == null
-        ? <section><h2>No contents</h2></section>
-        : <ReactMarkdown {...rendererOptions}>{children}</ReactMarkdown>
-      }
+      <ReactMarkdown {...rendererOptions}>
+        { children ?? '## No Contents' }
+      </ReactMarkdown>
     </>
   );
 };