Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Atractorrr/Attraction-FE in…
Browse files Browse the repository at this point in the history
…to fix/ci-#ATR-574
  • Loading branch information
SWARVY committed Jul 22, 2024
2 parents 646bc70 + 6e30d60 commit ee37955
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
12 changes: 5 additions & 7 deletions apps/service/src/features/filter-article/ui/CategoryDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@ export default function CategoryDropdown({
<WarnTxt content="카테고리를 불러오지 못했어요" color="red" />
</div>
)}
{data && (
<>
{data.length === 0 && (
<WarnTxt content="구독한 뉴스레터가 없어요" type="info" />
)}
{data &&
(data.length <= 0 ? (
<WarnTxt content="구독한 뉴스레터가 없어요" type="info" />
) : (
<DropdownMenuRadioGroup value={selectedCategory ?? 'all'}>
<DropdownMenuRadioItem
value="all"
Expand All @@ -59,8 +58,7 @@ export default function CategoryDropdown({
</DropdownMenuRadioItem>
))}
</DropdownMenuRadioGroup>
</>
)}
))}
</DropdownMenuContent>
</DropdownMenu>
)
Expand Down
11 changes: 5 additions & 6 deletions apps/service/src/features/filter-article/ui/FilterButton.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
'use client'

import React, {
DetailedHTMLProps,
InputHTMLAttributes,
LegacyRef,
type ButtonHTMLAttributes,
type DetailedHTMLProps,
forwardRef,
} from 'react'

const FilterButton = forwardRef<
HTMLInputElement,
HTMLButtonElement,
DetailedHTMLProps<
InputHTMLAttributes<HTMLButtonElement>,
ButtonHTMLAttributes<HTMLButtonElement>,
HTMLButtonElement
> & { active?: boolean }
>(({ type, className, active: isActive = false, onClick, ...props }, ref) => (
<button
ref={ref as LegacyRef<HTMLButtonElement> | undefined}
ref={ref}
type="button"
className={`flex h-10 items-center justify-center gap-2 rounded-lg px-3 py-2 transition-colors ${
isActive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
'use client'

import React, {
DetailedHTMLProps,
InputHTMLAttributes,
LegacyRef,
type ButtonHTMLAttributes,
type DetailedHTMLProps,
forwardRef,
} from 'react'

const DefaultButton = forwardRef<
HTMLInputElement,
DetailedHTMLProps<InputHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>
HTMLButtonElement,
DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>
>(({ children, type, className, ...props }, ref) => (
<button
ref={ref as LegacyRef<HTMLButtonElement> | undefined}
ref={ref}
type="button"
className="block h-12 w-full rounded-lg bg-gray-700 p-2 text-center font-medium text-gray-50 transition-colors hover:bg-gray-800 disabled:!bg-gray-50 disabled:!text-gray-400 xs:text-lg md:h-10 md:rounded md:text-base dark:bg-gray-50 dark:text-gray-700 dark:hover:bg-gray-100 dark:disabled:!bg-gray-700 dark:disabled:!text-gray-500"
{...props}>
Expand Down

0 comments on commit ee37955

Please sign in to comment.