update customers in the middle,

This commit is contained in:
louiscklaw
2025-04-22 22:56:30 +08:00
parent 69cb0718be
commit dfd6ecc744
17 changed files with 985 additions and 295 deletions

View File

@@ -25,7 +25,6 @@ import { defaultCrCategory } from '@/components/dashboard/cr/categories/_constan
import { Notifications } from '@/components/dashboard/cr/categories/notifications';
import type { CrCategory } from '@/components/dashboard/cr/categories/type';
import FormLoading from '@/components/loading';
import BasicDetailCard from './BasicDetailCard';
import TitleCard from './TitleCard';
@@ -37,7 +36,6 @@ export default function Page(): React.JSX.Element {
//
const [showLoading, setShowLoading] = React.useState<boolean>(true);
const [showError, setShowError] = React.useState({ show: false, detail: '' });
//
const [showLessonCategory, setShowLessonCategory] = React.useState<CrCategory>(defaultCrCategory);
@@ -55,7 +53,6 @@ export default function Page(): React.JSX.Element {
.catch((err) => {
logger.error(err);
toast(t('list.error'));
setShowError({ show: true, detail: JSON.stringify(err) });
})
.finally(() => {

View File

@@ -34,6 +34,7 @@ import FormLoading from '@/components/loading';
export default function Page({ searchParams }: PageProps): React.JSX.Element {
const { t } = useTranslation(['lp_categories']);
// TODO: align to customers page.tsx
const { email, phone, sortDir, status, name, visible, type } = searchParams;
const router = useRouter();
const [lessonCategoriesData, setLessonCategoriesData] = React.useState<CrCategory[]>([]);