import React from 'react';
import { Route } from 'react-router-dom';
import { Helmet } from 'react-helmet-async';
import HomePage from './pages/HomePage';
import LoginPage from './pages/LoginPage';
import RegisterPage from './pages/RegisterPage';
import PostListPage from './pages/PostListPage';
import PostPage from './pages/PostPage';
import WritePage from './pages/WritePage';

const App = () => {
  return (
    <>
      <Helmet>
        <title>D&K Blog 에 오신 것을 환영합니다!</title>
      </Helmet>
      <Route exact path="/" component={HomePage} />
      <Route path="/login" component={LoginPage} />
      <Route path="/posts" component={PostListPage} />
      <Route path="/post/:postId" component={PostPage} />
      <Route path="/write" component={WritePage} />
    </>
  );
};

export default App;
