diff --git a/packages/react/.eslintrc.cjs b/packages/react/.eslintrc.cjs index ad75bc933..fc6ad2b96 100644 --- a/packages/react/.eslintrc.cjs +++ b/packages/react/.eslintrc.cjs @@ -32,7 +32,7 @@ module.exports = { 'warn', { allowConstantExport: true }, ], - '@typescript-eslint/no-unused-vars': ['warn'], + '@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], "tailwindcss/no-custom-classname": ['warn'] }, } diff --git a/packages/react/src/Kitchensink.tsx b/packages/react/src/Kitchensink.tsx index 0f241d260..0d4644179 100644 --- a/packages/react/src/Kitchensink.tsx +++ b/packages/react/src/Kitchensink.tsx @@ -23,7 +23,7 @@ function App() {

Color and variants:

-
+
diff --git a/packages/react/src/components/channel/ChannelCard.tsx b/packages/react/src/components/channel/ChannelCard.tsx index 3f5dd6688..182e6b0ba 100644 --- a/packages/react/src/components/channel/ChannelCard.tsx +++ b/packages/react/src/components/channel/ChannelCard.tsx @@ -31,7 +31,7 @@ export function ChannelCard({ // Set min-height because react-virtuoso will break if the height is not fixed
-
{name}
+
{name}
{t("component.channelInfo.subscriberCount", { diff --git a/packages/react/src/components/common/ErrorFallback.tsx b/packages/react/src/components/common/ErrorFallback.tsx index 2502472dd..5635c6c52 100644 --- a/packages/react/src/components/common/ErrorFallback.tsx +++ b/packages/react/src/components/common/ErrorFallback.tsx @@ -5,7 +5,7 @@ import { useRouteError } from "react-router-dom"; import { Button } from "@/shadcn/ui/button"; import { useAuth } from "@/hooks/useAuth"; -export function ErrorFallback(props?: FallbackProps) { +export function ErrorFallback(props?: Partial) { const routeError = useRouteError() as Error | null; const { t } = useTranslation(); const { logout } = useAuth(); diff --git a/packages/react/src/components/header/header.tsx b/packages/react/src/components/header/header.tsx index 35b796a86..cdc7d0ecc 100644 --- a/packages/react/src/components/header/header.tsx +++ b/packages/react/src/components/header/header.tsx @@ -1,38 +1,48 @@ +import { toggleSidebarAtom } from "@/hooks/useFrame"; import { darkAtom } from "@/hooks/useTheme"; import { Button } from "@/shadcn/ui/button"; +import { Input } from "@/shadcn/ui/input"; import { userAtom } from "@/store/auth"; import { useAtom, useAtomValue } from "jotai"; +import { useSetAtom } from "jotai/react"; import { useTranslation } from "react-i18next"; import { Link } from "react-router-dom"; -interface HeaderProps { - onClick: () => void; +interface HeaderProps extends React.DetailedHTMLProps, HTMLElement>{ id: string; } -export function Header({ onClick, id }: HeaderProps) { +export function Header({ id }: HeaderProps) { const { t } = useTranslation(); const [dark, toggle] = useAtom(darkAtom); const user = useAtomValue(userAtom); + const frameToggleSidebar = useSetAtom(toggleSidebarAtom); return (
- -
Hololive
-
+ + {user ? ( -