瀏覽代碼

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>
     </>
   );
 };