Skip to content

Commit

Permalink
🆙bump: version up dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Marukome0743 committed Mar 25, 2024
1 parent 28ab23a commit e82caa5
Show file tree
Hide file tree
Showing 6 changed files with 214 additions and 209 deletions.
4 changes: 2 additions & 2 deletions app/components/scrollToTop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { useState } from 'react'

export function ScrollToTop() {
const [isScrollToTop, setIsScrollToTop] = useState(false)
const SCROLL_POINT = 200
const scrollPoint = 200

if (typeof window !== 'undefined') {
window.onscroll = () => setIsScrollToTop(SCROLL_POINT < window.scrollY)
window.onscroll = () => setIsScrollToTop(scrollPoint < window.scrollY)
}

return (
Expand Down
11 changes: 8 additions & 3 deletions app/register/components/imageUploader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export function ImageUploader<FormType extends FieldValues>({
const [image, setImage] = useState<FileList | null>(null)

function onClickUpload(e: React.ChangeEvent<HTMLInputElement>) {
if (isFileTooLarge(e.target.files?.[0].size as number)) return
if (isFileTooLarge(e.target.files?.[0].size as number)) {
return
}
setImage(e.target.files)
}

Expand Down Expand Up @@ -94,16 +96,19 @@ function DropImageZone({

function onDragLeave(e: DragEvent<HTMLDivElement>) {
e.preventDefault()
if (e.relatedTarget && e.currentTarget.contains(e.relatedTarget as Node))
if (e.relatedTarget && e.currentTarget.contains(e.relatedTarget as Node)) {
return
}
setIsHoverd(false)
}

function onDrop(e: DragEvent<HTMLDivElement>) {
e.preventDefault()
setIsHoverd(false)

if (isFileTooLarge(e.dataTransfer.files[0].size)) return
if (isFileTooLarge(e.dataTransfer.files[0].size)) {
return
}
setImage(e.dataTransfer.files)
}

Expand Down
18 changes: 9 additions & 9 deletions app/register/components/profileForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function ProfileForm() {
は必須項目
</p>
<Input
Icon={UserIcon}
icon=<UserIcon className="h-6 w-6 opacity-70" />
name="name"
placeholder="オープン太郎"
register={register}
Expand All @@ -74,7 +74,7 @@ export function ProfileForm() {
defaultValue={''}
required={true}
>
<option value={''} disabled>
<option value={''} disabled={true}>
以下から1つ選択
</option>
{COMPANIES.map((company) => (
Expand All @@ -85,23 +85,23 @@ export function ProfileForm() {
</select>
</label>
<Input
Icon={IdentificationIcon}
icon=<IdentificationIcon className="h-6 w-6 opacity-70" />
name="employeeId"
placeholder="123456"
register={register}
title={CHECKLIST.employeeId}
type="number"
/>
<Input
Icon={PhoneIcon}
icon=<PhoneIcon className="h-6 w-6 opacity-70" />
name="telephone"
placeholder="09012345678"
register={register}
title={CHECKLIST.telephone}
type="tel"
/>
<Input
Icon={EnvelopeIcon}
icon=<EnvelopeIcon className="h-6 w-6 opacity-70" />
name="email"
placeholder="example@mail.com"
register={register}
Expand Down Expand Up @@ -150,23 +150,23 @@ export function ProfileForm() {
}

function Input({
Icon,
icon,
name,
placeholder,
register,
title,
type,
}: {
Icon: React.ElementType
icon: React.ReactNode
name: Path<Profile>
placeholder: string
register: UseFormRegister<Profile>
title: string
type: string
}) {
}): React.JSX.Element {
return (
<label className="input input-bordered flex items-center gap-2">
<Icon className="h-4 w-4 opacity-70" />
{icon}
<span className="label-text after:ml-0.5 after:text-red-500 after:content-['*']">
{title}
</span>
Expand Down
Binary file modified bun.lockb
Binary file not shown.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
},
"devDependencies": {
"@biomejs/biome": "^1.6.2",
"@happy-dom/global-registrator": "^14.3.1",
"@happy-dom/global-registrator": "^14.3.6",
"@heroicons/react": "^2.1.3",
"@testing-library/react": "^14.2.2",
"@types/bun": "^1.0.10",
"@types/node": "^20.11.30",
"@types/react": "^18.2.69",
"@types/react-dom": "^18.2.22",
"daisyui": "^4.7.3",
"daisyui": "^4.8.0",
"postcss": "^8.4.38",
"sharp": "^0.33.2",
"sharp": "^0.33.3",
"tailwindcss": "^3.4.1",
"typescript": "^5.4.3"
}
Expand Down
Loading

0 comments on commit e82caa5

Please sign in to comment.