Skip to content

Commit

Permalink
Modify data structure and onboarding rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
camilovegag committed Feb 9, 2024
1 parent 9440365 commit ee3e7e8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
18 changes: 11 additions & 7 deletions packages/berlin/src/data/onboarding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,24 @@ const onboarding = {
{
id: 0,
title: `Ambitions & Trust Assumptions`,
body: `Our mechanisms (plural voting, peer prediction) require some social information (e.g., organizational affiliation, academic credentials) to work. Initially, this information will be stored in the community’s secure database (managed by Lexicon), and used solely for the purposes of calculating plurality scores and managing community attendance.`,
body: [
{
id: 0,
text: `Our mechanisms (plural voting, peer prediction) require some social information (e.g., organizational affiliation, academic credentials) to work. Initially, this information will be stored in the community’s secure database (managed by Lexicon), and used solely for the purposes of calculating plurality scores and managing community attendance.`,
},
{
id: 1,
text: `Our ambition is to add a ZKDF PCD (zero-knowledge data format proof-carrying data) to your Zupass, which will allow us to conduct experiments using zero-knowledge proofs and eliminate this information from our database. We welcome community participation in enhancing privacy.`,
},
],
},
{
id: 1,
title: `ZKDF PCDs`,
body: `Our ambition is to add a ZKDF PCD (zero-knowledge data format proof-carrying data) to your Zupass, which will allow us to conduct experiments using zero-knowledge proofs and eliminate this information from our database. We welcome community participation in enhancing privacy.`,
},
{
id: 2,
title: `Forkability`,
body: `Each member of the Plural Research Society who attends our community gathering will receive a credential represented as a PCD. This will enable anyone to invite members to future convenings with zero-knowledge verification.`,
},
{
id: 3,
id: 2,
title: `Guiding Principles`,
body: [
{
Expand Down
14 changes: 12 additions & 2 deletions packages/berlin/src/pages/Onboarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ function Onboarding() {
export default Onboarding;

type BodyContentProps = {
content: string | { id: number; title: string; text: string }[];
content: string | { id: number; title?: string; text: string }[];
};

function BodyContent({ content }: BodyContentProps) {
if (Array.isArray(content)) {
if (Array.isArray(content) && content[0].title) {
return (
<ul>
{content.map((item) => (
Expand All @@ -69,5 +69,15 @@ function BodyContent({ content }: BodyContentProps) {
);
}

if (Array.isArray(content)) {
return (
<FlexColumn $gap="1.5rem">
{content.map((item) => (
<Body key={item.id}>{item.text}</Body>
))}
</FlexColumn>
);
}

return <Body $minHeight={'7rem'}>{content}</Body>;
}

0 comments on commit ee3e7e8

Please sign in to comment.