refactor: add survey add state

This commit is contained in:
moonrailgun 2024-05-21 20:09:00 +08:00
parent 8f37c47a57
commit 3ecd7aa171

View File

@ -8,6 +8,7 @@ import { useEvent } from '@/hooks/useEvent';
import { LayoutV2 } from '@/pages/LayoutV2'; import { LayoutV2 } from '@/pages/LayoutV2';
import { useCurrentWorkspaceId } from '@/store/user'; import { useCurrentWorkspaceId } from '@/store/user';
import { routeAuthBeforeLoad } from '@/utils/route'; import { routeAuthBeforeLoad } from '@/utils/route';
import { cn } from '@/utils/style';
import { Trans, useTranslation } from '@i18next-toolkit/react'; import { Trans, useTranslation } from '@i18next-toolkit/react';
import { import {
createFileRoute, createFileRoute,
@ -71,6 +72,7 @@ function PageComponent() {
title={t('Survey')} title={t('Survey')}
actions={ actions={
<Button <Button
className={cn(pathname === '/survey/add' && '!bg-muted')}
variant="outline" variant="outline"
Icon={LuPlus} Icon={LuPlus}
onClick={handleClickAdd} onClick={handleClickAdd}