-
Notifications
You must be signed in to change notification settings - Fork 17
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 #26 from alleslabs/fix-typos
fix(pages): fix typos and misc
- Loading branch information
Showing
15 changed files
with
117 additions
and
115 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
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
88 changes: 0 additions & 88 deletions
88
src/lib/pages/instantiate/component/code-select/CodeTable.tsx
This file was deleted.
Oops, something went wrong.
87 changes: 87 additions & 0 deletions
87
src/lib/pages/instantiate/component/code-select/CodeTableReadOnly.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,87 @@ | ||
import { | ||
Table, | ||
TableContainer, | ||
Tbody, | ||
Td, | ||
Text, | ||
Th, | ||
Thead, | ||
Tr, | ||
} from "@chakra-ui/react"; | ||
|
||
import type { CodeInfo } from "lib/types"; | ||
import { truncate } from "lib/utils"; | ||
|
||
interface TableRowProps { | ||
onCodeSelect: (newVal: string) => void; | ||
codeDetail: CodeInfo; | ||
} | ||
|
||
const TableRow = ({ onCodeSelect, codeDetail }: TableRowProps) => { | ||
return ( | ||
<Tr | ||
sx={{ | ||
"& td:first-of-type": { pl: "60px" }, | ||
"& td:last-child": { pr: "60px" }, | ||
}} | ||
cursor="pointer" | ||
_hover={{ bg: "gray.900", transition: "all .2s" }} | ||
onClick={() => onCodeSelect(codeDetail.id.toString())} | ||
> | ||
<Td width="20%"> | ||
<Text variant="body2">{codeDetail.id}</Text> | ||
</Td> | ||
<Td width="40%"> | ||
<Text variant="body2" className="ellipsis"> | ||
{codeDetail?.description ?? "No Description"} | ||
</Text> | ||
</Td> | ||
<Td width="15%" textAlign="center"> | ||
<Text variant="body2">{codeDetail.contracts}</Text> | ||
</Td> | ||
<Td width="25%"> | ||
<Text variant="body2">{truncate(codeDetail.uploader)}</Text> | ||
</Td> | ||
</Tr> | ||
); | ||
}; | ||
|
||
interface CodeTableReadOnlyProps { | ||
onCodeSelect: (code: string) => void; | ||
codes: CodeInfo[]; | ||
} | ||
|
||
export const CodeTableReadOnly = ({ | ||
onCodeSelect, | ||
codes, | ||
}: CodeTableReadOnlyProps) => { | ||
return ( | ||
<TableContainer w="full" my="16px"> | ||
<Table variant="simple"> | ||
<Thead> | ||
<Tr | ||
sx={{ | ||
"& th:first-of-type": { pl: "60px" }, | ||
"& th:last-child": { pr: "60px" }, | ||
"& th": { textTransform: "none", border: "none", color: "white" }, | ||
}} | ||
> | ||
<Th width="20%">Code ID</Th> | ||
<Th width="40%">Description</Th> | ||
<Th width="15%">Contracts</Th> | ||
<Th width="25%">Uploader</Th> | ||
</Tr> | ||
</Thead> | ||
<Tbody> | ||
{codes.map((code, index) => ( | ||
<TableRow | ||
key={code.id + index.toString()} | ||
codeDetail={code} | ||
onCodeSelect={onCodeSelect} | ||
/> | ||
))} | ||
</Tbody> | ||
</Table> | ||
</TableContainer> | ||
); | ||
}; |
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
7801f7d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
celatone-frontend – ./
celatone-frontend-git-main-alles-labs.vercel.app
celatone-frontend-alles-labs.vercel.app
osmosis.celat.one
celatone-frontend.vercel.app