diff --git a/.eslintrc.js b/.eslintrc.js
index df758fc7..fa3c6fe0 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -28,6 +28,7 @@ module.exports = init({
'@typescript-eslint/no-confusing-void-expression': 'off',
'react/jsx-no-useless-fragment': 'off',
'react-hooks/rules-of-hooks': 'off',
+ 'storybook/no-title-property-in-meta': 'off',
},
},
],
diff --git a/app/pages/Auth/Login/Login.tsx b/app/Auth/Login/Login.tsx
similarity index 100%
rename from app/pages/Auth/Login/Login.tsx
rename to app/Auth/Login/Login.tsx
diff --git a/app/pages/Auth/Login/index.ts b/app/Auth/Login/index.ts
similarity index 100%
rename from app/pages/Auth/Login/index.ts
rename to app/Auth/Login/index.ts
diff --git a/app/pages/Auth/index.ts b/app/Auth/index.ts
similarity index 100%
rename from app/pages/Auth/index.ts
rename to app/Auth/index.ts
diff --git a/app/pages/Dashboard/DashboardLayout.cy.tsx b/app/Dashboard/DashboardLayout.cy.tsx
similarity index 100%
rename from app/pages/Dashboard/DashboardLayout.cy.tsx
rename to app/Dashboard/DashboardLayout.cy.tsx
diff --git a/app/pages/Dashboard/DashboardLayout.tsx b/app/Dashboard/DashboardLayout.tsx
similarity index 91%
rename from app/pages/Dashboard/DashboardLayout.tsx
rename to app/Dashboard/DashboardLayout.tsx
index 38973fcf..7ef16ba6 100644
--- a/app/pages/Dashboard/DashboardLayout.tsx
+++ b/app/Dashboard/DashboardLayout.tsx
@@ -1,4 +1,3 @@
-import { SideBar } from '@camp/design';
import { Outlet } from '@camp/router';
import {
AppShell as MantineAppShell,
@@ -9,6 +8,8 @@ import {
import { ModalsProvider } from '@mantine/modals';
import { Notifications } from '@mantine/notifications';
+import { DashboardSidebar } from './_components/DashboardSidebar';
+
const useStyles = createStyles(theme => ({
body: {
height: '100vh',
@@ -35,7 +36,7 @@ export const DashboardLayout = ({ children = outlet }) => {
asideOffsetBreakpoint="sm"
navbar={
-
+
}
>
diff --git a/app/pages/Dashboard/Households/HouseholdDetail/HouseholdDetail.ids.ts b/app/Dashboard/Households/HouseholdDetail/HouseholdDetail.ids.ts
similarity index 100%
rename from app/pages/Dashboard/Households/HouseholdDetail/HouseholdDetail.ids.ts
rename to app/Dashboard/Households/HouseholdDetail/HouseholdDetail.ids.ts
diff --git a/app/pages/Dashboard/Households/HouseholdDetail/HouseholdDetail.tsx b/app/Dashboard/Households/HouseholdDetail/HouseholdDetail.tsx
similarity index 91%
rename from app/pages/Dashboard/Households/HouseholdDetail/HouseholdDetail.tsx
rename to app/Dashboard/Households/HouseholdDetail/HouseholdDetail.tsx
index 9e8cb6d0..edfa2af5 100644
--- a/app/pages/Dashboard/Households/HouseholdDetail/HouseholdDetail.tsx
+++ b/app/Dashboard/Households/HouseholdDetail/HouseholdDetail.tsx
@@ -8,6 +8,7 @@ import {
import { debug } from '@camp/debug';
import {
ControlledSelect,
+ DestructiveButton,
DetailCard,
FullPageLoader,
showNotification,
@@ -25,14 +26,11 @@ import { Button, createStyles, Flex, Title } from '@mantine/core';
import { useBoolean } from 'ahooks';
import { useForm } from 'react-hook-form';
-import {
- HouseholderDetail,
- InformationBadge,
- MemberList,
- SeverityBadge,
- UndoButton,
-} from '../../../../components';
-import { openDeleteHouseholdModal } from '../DeleteHouseholdModal';
+import { InformationBadge } from '../../_components/InformationBadge';
+import { SeverityBadge } from '../../_components/SeverityBadge';
+import { openDeleteHouseholdModal } from '../_components/DeleteHouseholdModal';
+import { HouseholderDetail } from './_components/HouseholderDetail';
+import { MemberList } from './_components/MemberList';
import { householdDetailIds as ids } from './HouseholdDetail.ids';
interface FormSchema {
@@ -57,7 +55,7 @@ const useStyles = createStyles(theme => ({
export const HouseholdDetail = () => {
const t = messages.householdDetail;
const tNotification = messages.notification.household;
- const householdId = useParams();
+ const { id } = useParams();
const navigate = useNavigate();
const {
handleSubmit,
@@ -75,7 +73,7 @@ export const HouseholdDetail = () => {
loading,
error,
} = useHouseholdQuery({
- variables: { id: householdId },
+ variables: { id },
onCompleted: d => {
reset(d.household ?? {});
},
@@ -91,14 +89,14 @@ export const HouseholdDetail = () => {
const household = householdData?.household;
const { data: householderData } = useHouseholderQuery({
- variables: { id: householdId },
+ variables: { id },
});
const onUpdateHousehold = handleSubmit(async formData => {
try {
await updateHousehold({
variables: {
- id: householdId,
+ id,
update: { name: formData.name, severity: formData.severity },
},
});
@@ -196,12 +194,14 @@ export const HouseholdDetail = () => {
{isEditing ? (
<>
- {
reset();
setIsEditing(false);
}}
- />
+ >
+ {messages.actions.undoBtn}
+