Skip to content

Commit

Permalink
fixup! feat: introduce login page and login form
Browse files Browse the repository at this point in the history
  • Loading branch information
literat committed Nov 18, 2024
1 parent d9752b8 commit d059701
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/components/Error/Error.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
import React from 'react';
import styles from './Error.module.scss';

export default function Error({ error }: { error: unknown }) {
console.log(error);

export default function Error({ error }: { error: string }) {
if (!error) {
return null;
}

// @ts-expect-error -- Type '{}' is not assignable to type 'ReactNode'.
return <div className={styles.Error}>{error}</div>;

return (
<div className={styles.Error}>
<p>
<strong>Shoot!</strong>
{/* @ts-expect-error -- 'error' is of type 'unknown'.*/}
{error.message.replace('Error: ', '')}
{error}
</p>
</div>
);
Expand Down

0 comments on commit d059701

Please sign in to comment.