import React from 'react';
import { useDispatch } from 'react-redux';

import { logOutEventAction } from '@/modules/@common/token/redux/slices';

import Page from './page';

function Error() {
  const dispatch = useDispatch();

  return (
    <Page
      title="Internal Server Error"
      description="Sorry, something went wrong"
      linkText={
        <>
          Please, try to&nbsp;
          <strong>Re-login</strong>
        </>
      }
      onClick={() => dispatch(logOutEventAction())}
    />
  );
}

export default Error;
