Skip to content

Commit

Permalink
clients/web: remove is tax applicable checkbox on Custom benefit crea…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
frankie567 committed Dec 17, 2024
1 parent faa4bdc commit 2d55075
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 31 deletions.
26 changes: 1 addition & 25 deletions clients/apps/web/src/components/Benefit/BenefitForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {
SelectValue,
} from 'polarkit/components/ui/atoms/select'
import TextArea from 'polarkit/components/ui/atoms/textarea'
import { Checkbox } from 'polarkit/components/ui/checkbox'
import {
FormControl,
FormDescription,
Expand Down Expand Up @@ -127,9 +126,7 @@ interface CustomBenefitFormProps {
update?: boolean
}

export const CustomBenefitForm = ({
update = false,
}: CustomBenefitFormProps) => {
export const CustomBenefitForm = ({}: CustomBenefitFormProps) => {
const { control } = useFormContext<BenefitCustomCreate>()

return (
Expand All @@ -155,27 +152,6 @@ export const CustomBenefitForm = ({
)
}}
/>
{!update && (
<FormField
control={control}
name="is_tax_applicable"
render={({ field }) => {
return (
<FormItem className="flex flex-row items-center space-x-3 space-y-0">
<FormControl>
<Checkbox
defaultChecked={field.value}
onCheckedChange={field.onChange}
/>
</FormControl>
<FormLabel className="text-sm leading-none">
Tax Applicable
</FormLabel>
</FormItem>
)
}}
/>
)}
</>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ const CreateBenefitModalContent = ({
properties: {
...(properties as any),
},
is_tax_applicable: false,
},
})

Expand Down
3 changes: 0 additions & 3 deletions clients/apps/web/src/hooks/oauth-accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,5 @@ export const usePlatformOAuthAccount = (
export const useGitHubAccount = (): OAuthAccountRead | undefined =>
usePlatformOAuthAccount(OAuthPlatform.GITHUB)

export const useDiscordAccount = (): OAuthAccountRead | undefined =>
usePlatformOAuthAccount(OAuthPlatform.DISCORD)

export const useGoogleAccount = (): OAuthAccountRead | undefined =>
usePlatformOAuthAccount(OAuthPlatform.GOOGLE)
2 changes: 0 additions & 2 deletions clients/apps/web/src/hooks/queries/dummy_products.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ export let products: Product[] = [
modified_at: null,
organization_id: '123',
properties: { note: null },
is_tax_applicable: true,
},
],
media: [
Expand Down Expand Up @@ -152,7 +151,6 @@ export let products: Product[] = [
modified_at: null,
organization_id: '123',
properties: { note: null },
is_tax_applicable: true,
},
],
media: [
Expand Down

0 comments on commit 2d55075

Please sign in to comment.