Skip to content

Commit

Permalink
chore: remove unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Drish-xD committed Aug 25, 2024
1 parent 7a5b30f commit 8d8bae5
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 30 deletions.
8 changes: 1 addition & 7 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# "local" | "staging" | "production"
APP_ENV=""

# API Base URL and Bearer Token
AF_DB_URL=""
AF_BEARER_TOKEN=""

# SNS Configuration
AF_TOPIC_ARN=""
AF_BEARER_TOKEN=""
AF_ACCESS_KEY_ID=""
AF_SECRET_ACCESS_KEY=""
6 changes: 3 additions & 3 deletions src/components/ui/calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }: C
...classNames,
}}
components={{
IconLeft: ({ ...props }) => <ChevronLeft className='h-4 w-4' />,
IconRight: ({ ...props }) => <ChevronRight className='h-4 w-4' />,
IconLeft: ({ ...props }) => <ChevronLeft className="h-4 w-4" />,
IconRight: ({ ...props }) => <ChevronRight className="h-4 w-4" />,
Dropdown: ({ name, value, children, onChange }) => {
type OptionElement = React.ReactElement<React.HTMLProps<HTMLOptionElement>>;
const options = React.Children.toArray(children) as OptionElement[];
Expand All @@ -74,7 +74,7 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }: C
>
<SelectValue />
</SelectTrigger>
<SelectContent position='popper' side='bottom' align='center' sideOffset={2}>
<SelectContent position="popper" side="bottom" align="center" sideOffset={2}>
{options.map((option, index) => {
return (
<SelectItem
Expand Down
6 changes: 3 additions & 3 deletions src/components/ui/checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Checkbox = React.forwardRef<
{...props}
>
<CheckboxPrimitive.Indicator className={cn('flex items-center justify-center text-current')}>
<Check className='h-4 w-4' />
<Check className="h-4 w-4" />
</CheckboxPrimitive.Indicator>
</CheckboxPrimitive.Root>
));
Expand All @@ -46,7 +46,7 @@ const ControlledCheckbox = React.forwardRef<
render={({ field }) => (
<FormItem
key={option.value as React.Key}
className='flex flex-row items-start space-x-3 space-y-0'
className="flex flex-row items-start space-x-3 space-y-0"
>
<FormControl ref={ref}>
<Checkbox
Expand All @@ -65,7 +65,7 @@ const ControlledCheckbox = React.forwardRef<
}}
/>
</FormControl>
<FormLabel className='text-sm font-normal'>{option.label}</FormLabel>
<FormLabel className="text-sm font-normal">{option.label}</FormLabel>
</FormItem>
)}
/>
Expand Down
12 changes: 6 additions & 6 deletions src/components/ui/date-time.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,26 @@ const DateTimePicker = forwardRef<
ref={refField}
disabled={disabled}
>
<CalendarIcon className='mr-2 h-4 w-4' />
<CalendarIcon className="mr-2 h-4 w-4" />
{value ? (
format(value, 'PP')
) : (
<span className='text-muted-foreground/80 italic font-medium'>
<span className="text-muted-foreground/80 italic font-medium">
Pick a date and time
</span>
)}
</Button>
</PopoverTrigger>
</FormControl>
<PopoverContent className='w-auto p-0'>
<PopoverContent className="w-auto p-0">
<Calendar
{...restSchemaProps}
{...restFieldProps}
id={`${restFieldProps.name}-calendar`}
captionLayout="dropdown-buttons"
fromYear={startOfToday().getFullYear()}
toYear={addYears(startOfToday(), ALLOWED_YEARS).getFullYear()}
mode='single'
mode="single"
selected={value}
onSelect={(d) => handleSelect(d)}
onMonthChange={handleSelect}
Expand All @@ -77,8 +77,8 @@ const DateTimePicker = forwardRef<
</PopoverContent>
</Popover>
</div>
<div className='flex flex-col gap-4 flex-1'>
<FormLabel className='self-start'>{label?.time}</FormLabel>
<div className="flex flex-col gap-4 flex-1">
<FormLabel className="self-start">{label?.time}</FormLabel>
<TimePicker setDate={onChange} date={value} />
</div>
</div>
Expand Down
22 changes: 11 additions & 11 deletions src/components/ui/time-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const TimePickerInput = React.forwardRef<HTMLInputElement, TimePickerInputProps>
onChange?.(e);
}}
type={type}
inputMode='decimal'
inputMode="decimal"
onKeyDown={(e) => {
onKeyDown?.(e);
handleKeyDown(e);
Expand Down Expand Up @@ -171,14 +171,14 @@ const TimePeriodSelect = React.forwardRef<HTMLButtonElement, PeriodSelectorProps
<SelectTrigger
value={period}
ref={ref}
className='w-[65px] focus:bg-accent focus:text-accent-foreground'
className="w-[65px] focus:bg-accent focus:text-accent-foreground"
onKeyDown={handleKeyDown}
>
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value='AM'>AM</SelectItem>
<SelectItem value='PM'>PM</SelectItem>
<SelectItem value="AM">AM</SelectItem>
<SelectItem value="PM">PM</SelectItem>
</SelectContent>
</Select>
</div>
Expand All @@ -201,21 +201,21 @@ function TimePicker({ date, setDate }: TimePickerProps) {
const periodRef = React.useRef<HTMLButtonElement>(null);

return (
<div className='flex items-center gap-4'>
<ClockIcon className='size-5 text-current' />
<div className="flex items-center gap-4">
<ClockIcon className="size-5 text-current" />
<TimePickerInput
id='hours'
picker='hours'
id="hours"
picker="hours"
period={period}
date={date}
setDate={setDate}
ref={hourRef}
onRightFocus={() => minuteRef.current?.focus()}
/>
<span className='-mx-1.5'>:</span>
<span className="-mx-1.5">:</span>
<TimePickerInput
id='minutes'
picker='minutes'
id="minutes"
picker="minutes"
date={date}
setDate={setDate}
ref={minuteRef}
Expand Down

0 comments on commit 8d8bae5

Please sign in to comment.