Skip to content

Commit

Permalink
feat: Added plausible custom events (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
lempira authored Feb 7, 2025
1 parent e5c3ec2 commit 0ec0206
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ export function FromAppIdCard({ machine }: Props) {
onSubmit={fromAppIdSelected}
formAction={
<FormActions>
<SubmitButton>Use existing</SubmitButton>
{/* eslint-disable-next-line tailwindcss/no-custom-classname */}
<SubmitButton className="plausible-event-name=app-lab-use-existing-app-id">Use existing</SubmitButton>
</FormActions>
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export function FromDeploymentCard({ machine }: Props) {
<span>Deploy a new app and create an app interface.</span>
</div>
<div className="flex grow flex-col">
<div className="ml-auto mt-auto">
{/* eslint-disable-next-line tailwindcss/no-custom-classname */}
<div className="plausible-event-name=app-lab-deploy-new-app ml-auto mt-auto">
<Button onClick={fromDeploymentSelected} {...disabledProps}>
{deployAppLabel}
</Button>
Expand Down
9 changes: 8 additions & 1 deletion src/features/fund/components/fund-account-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,14 @@ export function FundAccountForm({ onCreateReceiver, onSubmit, limit, defaultRece
onSubmit={fundAccount}
formAction={
<FormActions>
<SubmitButton>{onCreateReceiver ? 'Create and Fund' : 'Fund'}</SubmitButton>
<SubmitButton
// eslint-disable-next-line tailwindcss/no-custom-classname
className={
onCreateReceiver ? 'plausible-event-name=fund-account-form-create-and-fund' : 'plausible-event-name=fund-account-form-fund'
}
>
{onCreateReceiver ? 'Create and Fund' : 'Fund'}
</SubmitButton>
</FormActions>
}
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable tailwindcss/no-custom-classname */
import algosdk from 'algosdk'
import { useCallback, useMemo, useState } from 'react'
import { DialogBodyProps, useDialogForm } from '@/features/common/hooks/use-dialog-form'
Expand Down Expand Up @@ -343,7 +344,12 @@ export function TransactionsBuilder({
<div className="mb-4 flex items-center gap-2">
{title}
{!disableAddTransaction && (
<Button variant="outline-secondary" onClick={createTransaction} className="ml-auto" icon={<Plus size={16} />}>
<Button
variant="outline-secondary"
onClick={createTransaction}
className="plausible-event-name=txn-wizard-add-txn ml-auto"
icon={<Plus size={16} />}
>
{addTransactionLabel}
</Button>
)}
Expand Down Expand Up @@ -396,15 +402,20 @@ export function TransactionsBuilder({
</Button>
{onSimulated && (
<AsyncActionButton
className="w-28"
className="plausible-event-name=txn-wizard-simulate-txn w-28"
onClick={simulateTransactions}
icon={<SquarePlay size={16} />}
{...simulateButtonDisabledProps}
>
Simulate
</AsyncActionButton>
)}
<AsyncActionButton className="w-28" onClick={sendTransactions} icon={sendButtonConfig.icon} {...sendButtonDisabledProps}>
<AsyncActionButton
className="plausible-event-name=txn-wizard-send-txn w-28"
onClick={sendTransactions}
icon={sendButtonConfig.icon}
{...sendButtonDisabledProps}
>
{sendButtonConfig.label}
</AsyncActionButton>
</div>
Expand Down

0 comments on commit 0ec0206

Please sign in to comment.