Skip to content

Commit

Permalink
feat: string to text
Browse files Browse the repository at this point in the history
  • Loading branch information
JFKFred committed Oct 18, 2024
1 parent 6800436 commit d72d658
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
2 changes: 2 additions & 0 deletions client/src/app/(validator)/data-validation/validator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ export default function Validator({
})),
);

// TODO - delete validation when they change to success

// Set the status in metadata
const metadataWithStatus = setMetadataStatusFromValidations(
metadata,
Expand Down
17 changes: 11 additions & 6 deletions client/src/app/(validator)/metadata-structure/how-to.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,21 @@ export default function HowToCreateMetadataSchema() {
>
<AccordionTrigger>
<Typography as="code" className="text-lg">
How to use string value ?
How to use string (text) value ?
</Typography>
</AccordionTrigger>
<AccordionContent>
<ColInnerContent>
<Typography as="code">{`Simply enter "string" as the value for any key that you want to be treated as a string.`}</Typography>
<Typography
as="code"
className="text-sm text-white/50"
>{`A string is represented by double quotes: ""`}</Typography>

<Typography
as="code"
className="ml-4 text-white/50"
>{`Example: { name: "string" }`}</Typography>
>{`Example: { name: "text" }`}</Typography>
</ColInnerContent>
</AccordionContent>
</AccordionItem>
Expand Down Expand Up @@ -119,7 +124,7 @@ export default function HowToCreateMetadataSchema() {
<Typography
as="code"
className="ml-4 text-white/50"
>{`Example: { "name": "string", "age": 0, child: { name: "string", age: 0 }, position: [ [ 0, 1 ] ] }`}</Typography>
>{`Example: { "name": "text", "age": 0, child: { name: "text", age: 0 }, position: [ [ 0, 1 ] ] }`}</Typography>
</ColInnerContent>
</AccordionContent>
</AccordionItem>
Expand Down Expand Up @@ -152,7 +157,7 @@ export default function HowToCreateMetadataSchema() {
<Typography
as="code"
className="ml-4 text-white/50"
>{`Usage: [ "string" ]`}</Typography>
>{`Usage: [ "text" ]`}</Typography>
<Typography as="code">
<strong>number[] –</strong>
{` A list of numbers.`}
Expand All @@ -172,11 +177,11 @@ export default function HowToCreateMetadataSchema() {
<Typography
as="code"
className="ml-4 text-white/50"
>{`Example: [ { src: "string", mediaType: "string" } ]`}</Typography>
>{`Example: [ { src: "text", mediaType: "text" } ]`}</Typography>
<Typography
as="code"
className="ml-4 text-white/50"
>{`Usage: [ { src: "string", mediaType: "string" } ]`}</Typography>
>{`Usage: [ { src: "text", mediaType: "text" } ]`}</Typography>
<Typography as="code">
<strong>{`<type>`}[][] –</strong>
{` A list of arrays of <type> (arrays within arrays)`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export default function ValidatorStats() {
(doc) => doc.toJSON() as ValidationsCollection,
);

console.log(validations);

const keys = getKeyCount(validations);

return (
Expand Down
14 changes: 7 additions & 7 deletions client/src/lib/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ export const keys: Record<Status, keyof ProjectCollection> = {
};

export const DEFAULT_CIP25_SCHEMA: MetadataCollectionEditor = {
assetName: "string",
assetName: "text",
metadata: {
name: "string",
image: "string",
mediaType: "string",
description: "string",
name: "text",
image: "text",
mediaType: "text",
description: "text",
files: [
{
src: "string",
mediaType: "string",
src: "text",
mediaType: "text",
},
],
attributes: {},
Expand Down

0 comments on commit d72d658

Please sign in to comment.