LiteSun commented on code in PR #3014:
URL: https://github.com/apache/apisix-dashboard/pull/3014#discussion_r2076637314


##########
src/routes/ssls/index.tsx:
##########
@@ -1,9 +1,121 @@
-import { createFileRoute } from '@tanstack/react-router'
-
-export const Route = createFileRoute('/ssls/')({
-  component: RouteComponent,
-})
+import { queryClient } from '@/config/global';
+import { useSuspenseQuery } from '@tanstack/react-query';
+import { createFileRoute } from '@tanstack/react-router';
+import { useTranslation } from 'react-i18next';
+import type { APISIXType } from '@/types/schema/apisix';
+import { ProTable } from '@ant-design/pro-components';
+import type { ProColumns } from '@ant-design/pro-components';
+import { useEffect, useMemo } from 'react';
+import PageHeader from '@/components/page/PageHeader';
+import { ToAddPageBtn } from '@/components/page/ToAddPageBtn';
+import { AntdConfigProvider } from '@/config/antdConfigProvider';
+import { usePagination } from '@/utils/usePagination';
+import { pageSearchSchema } from '@/types/schema/pageSearch';
+import { getSSLListQueryOptions } from '@/apis/ssls';
 
 function RouteComponent() {
-  return <div>Hello "/ssl/"!</div>
+  const { t } = useTranslation();
+
+  const { pagination, handlePageChange, updateTotal } = usePagination({
+    queryKey: 'ssls',
+  });
+
+  const sslsQuery = useSuspenseQuery(getSSLListQueryOptions(pagination));
+  const { data, isLoading } = sslsQuery;
+
+  useEffect(() => {
+    if (data?.total) {
+      updateTotal(data.total);

Review Comment:
   create a issue to trach this, including sort import



##########
src/routes/ssls/index.tsx:
##########
@@ -1,9 +1,121 @@
-import { createFileRoute } from '@tanstack/react-router'
-
-export const Route = createFileRoute('/ssls/')({
-  component: RouteComponent,
-})
+import { queryClient } from '@/config/global';
+import { useSuspenseQuery } from '@tanstack/react-query';
+import { createFileRoute } from '@tanstack/react-router';
+import { useTranslation } from 'react-i18next';
+import type { APISIXType } from '@/types/schema/apisix';
+import { ProTable } from '@ant-design/pro-components';
+import type { ProColumns } from '@ant-design/pro-components';
+import { useEffect, useMemo } from 'react';
+import PageHeader from '@/components/page/PageHeader';
+import { ToAddPageBtn } from '@/components/page/ToAddPageBtn';
+import { AntdConfigProvider } from '@/config/antdConfigProvider';
+import { usePagination } from '@/utils/usePagination';
+import { pageSearchSchema } from '@/types/schema/pageSearch';
+import { getSSLListQueryOptions } from '@/apis/ssls';
 
 function RouteComponent() {
-  return <div>Hello "/ssl/"!</div>
+  const { t } = useTranslation();
+
+  const { pagination, handlePageChange, updateTotal } = usePagination({
+    queryKey: 'ssls',
+  });
+
+  const sslsQuery = useSuspenseQuery(getSSLListQueryOptions(pagination));
+  const { data, isLoading } = sslsQuery;
+
+  useEffect(() => {
+    if (data?.total) {
+      updateTotal(data.total);

Review Comment:
   create a issue to track this, including sort import



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to