-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b139ff
commit 488ebef
Showing
10 changed files
with
1,728 additions
and
1,511 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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import {CheckIcon} from '@chakra-ui/icons'; | ||
import {Stack, Text} from '@chakra-ui/react'; | ||
import {generatePath, Link} from 'react-router-dom'; | ||
import AppStatus, {statusMap} from './AppStatus'; | ||
|
||
interface Props { | ||
status?: string; | ||
path: string; | ||
} | ||
const StatusFilter: React.FC<Props> = ({status, path}) => { | ||
return ( | ||
<Stack borderWidth="1px" borderRadius="lg" padding="4" mt="5" mb="5" direction="row" spacing={4}> | ||
<Text>Filter by status:</Text> | ||
<Link to={generatePath(path)}> | ||
<AppStatus prefix={!status ? <CheckIcon marginEnd="1" /> : null} status="ALL" /> | ||
</Link> | ||
{Object.keys(statusMap).map((key) => ( | ||
<Link to={generatePath(path + `?status=${key}`)} key={key}> | ||
<AppStatus prefix={status === key ? <CheckIcon marginEnd="1" /> : null} status={key} /> | ||
</Link> | ||
))} | ||
</Stack> | ||
); | ||
}; | ||
|
||
export default StatusFilter; |
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
Oops, something went wrong.