-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1030 from IntersectMBO/develop
- Loading branch information
Showing
50 changed files
with
737 additions
and
184 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
30 changes: 30 additions & 0 deletions
30
govtool/frontend/src/components/molecules/EmptyStateDrepDirectory.tsx
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,30 @@ | ||
import { useTranslation } from "@hooks"; | ||
|
||
import { Card } from "./Card"; | ||
import { Typography } from "../atoms"; | ||
|
||
export const EmptyStateDrepDirectory = () => { | ||
const { t } = useTranslation(); | ||
|
||
return ( | ||
<Card | ||
border | ||
elevation={0} | ||
sx={{ | ||
alignItems: "center", | ||
display: "flex", | ||
flexDirection: "column", | ||
gap: 1, | ||
py: 5, | ||
width: "-webkit-fill-available", | ||
}} | ||
> | ||
<Typography fontSize={22}> | ||
{t("dRepDirectory.noResultsForTheSearchTitle")} | ||
</Typography> | ||
<Typography fontWeight={400}> | ||
{t("dRepDirectory.noResultsForTheSearchDescription")} | ||
</Typography> | ||
</Card> | ||
); | ||
}; |
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,27 @@ | ||
import { DREP_DIRECTORY_FILTERS } from "./filters"; | ||
|
||
describe("DREP_DIRECTORY_FILTERS", () => { | ||
it("should exclude 'Yourself' from filters", () => { | ||
// Arrange | ||
const expectedFilters = [ | ||
{ | ||
key: "Active", | ||
label: "Active", | ||
}, | ||
{ | ||
key: "Inactive", | ||
label: "Inactive", | ||
}, | ||
{ | ||
key: "Retired", | ||
label: "Retired", | ||
}, | ||
]; | ||
|
||
// Act | ||
const actualFilters = DREP_DIRECTORY_FILTERS; | ||
|
||
// Assert | ||
expect(actualFilters).toEqual(expectedFilters); | ||
}); | ||
}); |
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,6 +1,9 @@ | ||
import { DRepStatus } from "@/models"; | ||
|
||
export const DREP_DIRECTORY_FILTERS = Object.values(DRepStatus).map((status) => ({ | ||
key: status, | ||
label: status, | ||
})); | ||
export const DREP_DIRECTORY_FILTERS = Object.values(DRepStatus) | ||
// `Yourself` should be excluded from filters | ||
.filter((status) => status !== DRepStatus.Yourself) | ||
.map((status) => ({ | ||
key: status, | ||
label: status, | ||
})); |
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
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,5 @@ | ||
export function lovelaceToAda(lovelace: number) { | ||
if (lovelace === 0) return 0; | ||
|
||
return lovelace / 1e6; | ||
} |
Oops, something went wrong.