Skip to content

Commit

Permalink
Merge branch 'main' into 2431-update-contributingmd
Browse files Browse the repository at this point in the history
  • Loading branch information
bard authored Oct 17, 2023
2 parents 1bab7b1 + 41c22b7 commit 4197d6d
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 3 deletions.
5 changes: 4 additions & 1 deletion packages/builder/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ export default function Header() {
id="example-navbar-danger"
>
<div className="flex flex-col lg:flex-row list-none lg:ml-auto">
<Link to={newGrantPath()}>
<Link
to={newGrantPath()}
data-track-event="project-create-topnav-next"
>
<Button colorScheme="purple" className="mt-2 mr-2 mb-2">
<i className="icon">
<Plus color={colors["quaternary-text"]} />
Expand Down
3 changes: 3 additions & 0 deletions packages/builder/src/components/base/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ interface ButtonProps {
variant: ButtonVariants;
disabled?: boolean;
styles?: string[];
dataTrackEvent?: string;
}

function Button({
Expand All @@ -24,6 +25,7 @@ function Button({
variant,
disabled,
styles,
dataTrackEvent,
}: ButtonProps) {
const navigate = useNavigate();

Expand All @@ -40,6 +42,7 @@ function Button({
onClick={clickHandler}
className={`base-btn ${variant} ${styles?.join(" ")}`}
type="button"
data-track-event={dataTrackEvent}
>
{children}
</button>
Expand Down
1 change: 1 addition & 0 deletions packages/builder/src/components/base/NetworkForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ function NetworkForm({
disabled={switchTo !== props.currentChain}
variant={ButtonVariants.primary}
onClick={nextStep}
dataTrackEvent="project-create-network-next"
>
Next
</Button>
Expand Down
2 changes: 2 additions & 0 deletions packages/builder/src/components/base/Preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,15 @@ export default function Preview({
<Button
variant={ButtonVariants.outline}
onClick={() => setVerifying(ProjectFormStatus.Verification)}
dataTrackEvent="project-create-publish-back"
>
Back to Editing
</Button>
<Button
disabled={submitted}
variant={ButtonVariants.primary}
onClick={publishProject}
dataTrackEvent="project-create-publish-next"
>
Save and Publish
</Button>
Expand Down
2 changes: 2 additions & 0 deletions packages/builder/src/components/base/ProjectForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,15 @@ function ProjectForm({
<Button
variant={ButtonVariants.outline}
onClick={() => toggleModal(true)}
dataTrackEvent="project-create-details-cancel"
>
Cancel
</Button>
<Button
disabled={!formValidation.valid && submitted}
variant={ButtonVariants.primary}
onClick={nextStep}
dataTrackEvent="project-create-details-next"
>
Next
</Button>
Expand Down
13 changes: 12 additions & 1 deletion packages/builder/src/components/base/VerificationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,21 @@ export default function VerificationForm({
<Button
variant={ButtonVariants.outline}
onClick={() => setVerifying(ProjectFormStatus.Metadata)}
dataTrackEvent="project-create-social-back"
>
Back
</Button>
<Button variant={ButtonVariants.primary} onClick={saveAndPreview}>
<Button
variant={ButtonVariants.primary}
onClick={saveAndPreview}
dataTrackEvent={
!props.formMetaData.userGithub &&
!props.formMetaData.projectGithub &&
!props.formMetaData.projectTwitter
? "project-create-social-skip"
: "project-create-social-next"
}
>
{!props.formMetaData.userGithub &&
!props.formMetaData.projectGithub &&
!props.formMetaData.projectTwitter
Expand Down
6 changes: 5 additions & 1 deletion packages/builder/src/components/grants/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ function ProjectsList() {
Learn More.
</a>
</p>
<Link to={newGrantPath()} className="mt-6">
<Link
to={newGrantPath()}
className="mt-6"
data-track-event="project-create-center-next"
>
<Button variant={ButtonVariants.outline}>
Create a Project
</Button>
Expand Down

0 comments on commit 4197d6d

Please sign in to comment.