Skip to content

Instantly share code, notes, and snippets.

View imtheaman's full-sized avatar
💜

Aman Kumar imtheaman

💜
View GitHub Profile
@imtheaman
imtheaman / View.tsx
Created May 30, 2024 09:50
Basic container & presentor pattern in react
'use client';
import { Button, Form, Input } from "@/components/ui";
import { AppFormField, AppSelect, Combobox } from "@/components";
import { BinaryEnum } from "@/utils/enums";
import { MouseEventHandler } from "react";
import useLogic from "./useLogic";
function AddressDetails({ defaultValues, onDismiss, onComplete, userId }: { userId?: string, defaultValues?: any, onDismiss: MouseEventHandler<HTMLButtonElement>, onComplete: Function }) {
const address_type = defaultValues?.address_type === 'Permanent' ? 'permanent_address_attributes' : 'current_address_attributes'
const { onSubmit, form, stateData, districtData, pincodeData, setPincodeQuery } = useLogic(defaultValues, userId, onComplete, address_type);
@imtheaman
imtheaman / AdbCommands
Created November 3, 2023 11:52 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader