diff --git a/apps/frontend/src/components/ErrorComponent.tsx b/apps/frontend/src/components/ErrorComponent.tsx new file mode 100644 index 00000000..23593287 --- /dev/null +++ b/apps/frontend/src/components/ErrorComponent.tsx @@ -0,0 +1,21 @@ +import React from 'react'; +import { FetchBaseQueryError } from '@reduxjs/toolkit/query'; +import { SerializedError } from '@reduxjs/toolkit'; + +export const ErrorComponent = ({ error }: { error: FetchBaseQueryError | SerializedError | Error }) => { + return ( + <> + {/* +// @ts-ignore */} +
{error.statusText}
++ {/* +// @ts-ignore */} + {error.data.message} +
+ > + ); +}; diff --git a/apps/frontend/src/components/Loader.tsx b/apps/frontend/src/components/Loader.tsx index 5124f683..1298f564 100644 --- a/apps/frontend/src/components/Loader.tsx +++ b/apps/frontend/src/components/Loader.tsx @@ -1,7 +1,8 @@ import React, { SVGProps } from 'react'; import styled from 'styled-components'; -export const Loader = styled((props: SVGProps