-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/more-predictions-data
- Loading branch information
Showing
57 changed files
with
572 additions
and
423 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
height: 100dvh; | ||
overflow-x: auto; | ||
overflow-y: auto; | ||
scroll-padding: 64px 0; | ||
} | ||
|
||
.main { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { AlertCircleIcon } from 'lucide-react' | ||
import { useMemo } from 'react' | ||
|
||
interface ErrorStateProps { | ||
error?: any | ||
} | ||
|
||
export const ErrorState = ({ error }: ErrorStateProps) => { | ||
const title = error?.message ?? 'Unknown error' | ||
const data = error?.response?.data | ||
|
||
const description = useMemo(() => { | ||
const entries = data ? Object.entries(data) : undefined | ||
|
||
if (entries?.length) { | ||
const [key, value] = entries[0] | ||
|
||
return `${key}: ${value}` | ||
} | ||
}, [error]) | ||
|
||
return ( | ||
<div className="flex flex-col items-center py-24"> | ||
<AlertCircleIcon className="w-8 h-8 text-destructive mb-8" /> | ||
<span className="body-large font-medium mb-2">{title}</span> | ||
{description ? ( | ||
<span className="body-base text-muted-foreground">{description}</span> | ||
) : null} | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
export interface FilterProps { | ||
value: string | undefined | ||
isValid?: boolean | ||
onAdd: (value: string) => void | ||
onClear: () => void | ||
value: string | undefined | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.