feat: add in prettier and format code for consistency (#168)
This commit is contained in:
@@ -1,17 +1,22 @@
|
||||
import { ErrorMessage } from "@/types";
|
||||
import { FC } from "react";
|
||||
import { ErrorMessage } from '@/types';
|
||||
import { FC } from 'react';
|
||||
|
||||
interface Props {
|
||||
error: ErrorMessage
|
||||
error: ErrorMessage;
|
||||
}
|
||||
|
||||
export const ErrorMessageDiv: FC<Props> = ({ error }) => {
|
||||
return (
|
||||
<div className= "flex flex-col justify-center mx-auto h-full w-[300px] sm:w-[500px] space-y-6" >
|
||||
<div className="text-center text-red-500" >{error.title} {error.code ? <i>({error.code}) </i> : "" }</div >
|
||||
{ error.messageLines.map((line, index) => (
|
||||
<div key={index} className="text-center text-red-500" > {line} </div>
|
||||
)) }
|
||||
return (
|
||||
<div className="mx-auto flex h-full w-[300px] flex-col justify-center space-y-6 sm:w-[500px]">
|
||||
<div className="text-center text-red-500">
|
||||
{error.title} {error.code ? <i>({error.code}) </i> : ''}
|
||||
</div>
|
||||
{error.messageLines.map((line, index) => (
|
||||
<div key={index} className="text-center text-red-500">
|
||||
{' '}
|
||||
{line}{' '}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user