PluginProbe
Extendify / 3.1.6
Extendify v3.1.6
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
extendify / src / Assist / pages / Dashboard.jsx

Dashboard.jsx in Extendify 3.1.6, at src/Assist/pages/Dashboard.jsx

58 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { DesktopCards } from '@assist/components/dashboard/DesktopCards';
2 import { DomainBanner } from '@assist/components/dashboard/domains/DomainBanner';
3 import { SecondaryDomainBanner } from '@assist/components/dashboard/domains/SecondaryDomainBanner';
4 import { MobileCards } from '@assist/components/dashboard/MobileCards';
5 import { QuickLinks } from '@assist/components/dashboard/QuickLinks';
6 import { Recommendations } from '@assist/components/dashboard/Recommendations';
7 import { useTasks } from '@assist/hooks/useTasks';
8 import {
9 showDomainBanner,
10 showSecondaryDomainBanner,
11 } from '@assist/lib/domains';
12 import { Full } from '@assist/pages/layouts/Full';
13 import { useGlobalStore } from '@assist/state/globals';
14 import { useTasksStore } from '@assist/state/tasks';
15 import { Notification } from '@notifications/Notification';
16
17 export const Dashboard = () => {
18 const { tasks } = useTasks();
19 const { isDismissedBanner } = useGlobalStore();
20 const { isCompleted } = useTasksStore();
21 const totalCompleted = tasks.filter((task) => isCompleted(task.slug)).length;
22
23 return (
24 <Full>
25 {showDomainBanner && !isDismissedBanner('domain-banner') && (
26 <DomainBanner />
27 )}
28
29 {showSecondaryDomainBanner &&
30 !isDismissedBanner('secondary-domain-banner') && (
31 <SecondaryDomainBanner />
32 )}
33
34 <div className="mb-6">
35 <Notification slot="admin-assist" />
36 </div>
37
38 <DesktopCards
39 className="hidden md:block"
40 tasks={tasks}
41 totalCompleted={totalCompleted}
42 />
43
44 <MobileCards
45 className="md:hidden"
46 tasks={tasks}
47 totalCompleted={totalCompleted}
48 />
49
50 <div className="mb-6 gap-4 md:grid">
51 <QuickLinks className="col-span-2" />
52 </div>
53
54 <Recommendations />
55 </Full>
56 );
57 };
58