Skip to content
Snippets Groups Projects
Article.js 594 B
Newer Older
import React, {useEffect, useState} from "react";

import { useParams } from 'react-router-dom';

/*
 {
    _id: new ObjectId('65675ee46aab64d2ed605e3c'),
    title: 'ㅋ',
    content: 'ㅋㅋ',
    imageUrls: [],
    author: new ObjectId('6566403f224df4126bfb3e50'),
    comments: [],
    likes: [],
    createdAt: 2023-11-29T15:55:16.525Z,
    __v: 0
  }

*/

function Article(prop) {
  return (
    <div>
      <h1>{prop.title}</h1>
      <h2>{prop.author}</h2>
      <p>{prop.content}</p>
      {/* 게시글의 내용을 렌더링합니다. */}
    </div>
  );
}

export default Article;