diff --git a/dashboard/components/apps-summary.tsx b/dashboard/components/apps-summary.tsx
index 912f6e9..92f4e86 100644
--- a/dashboard/components/apps-summary.tsx
+++ b/dashboard/components/apps-summary.tsx
@@ -1,52 +1,13 @@
import Image from "next/image"
import Link from "next/link"
+import { recommendApps } from "@/config/apps"
import { getTotalApps } from "@/app/api/analystics/topapps/getAppStats"
import { Button } from "./ui/button"
import { Card, CardContent } from "./ui/card"
export default async function AppsSummary() {
- // recommend apps list
- const recommendApps = [
- {
- name: "Orb",
- description:
- "Mobile experience with a focus on creators and communities ",
- icon: "/apps/orb.png",
- url: "https://orb.ac",
- },
- {
- name: "Buttrfly",
- description: "Web3 Social Explorer",
- icon: "/apps/buttrfly.png",
- url: "https://buttrfly.app/",
- },
- {
- name: "T2",
- description: "Where writers find their niche",
- icon: "/apps/t2.png",
- url: "https://t2.world/",
- },
- {
- name: "Hey",
- description: "Open source platform for desktop",
- icon: "/apps/hey.png",
- url: "https://hey.xyz/",
- },
- {
- name: "Tape",
- description: "Open-source video platform for desktop",
- icon: "/apps/tape.png",
- url: "https://tape.xyz",
- },
- {
- name: "Dumpling",
- description: "Streaming and steaming the best content from Lens",
- icon: "/apps/dumpling.png",
- url: "https://www.dumpling.lol/",
- },
- ]
const totalApps = await getTotalApps()
return (
diff --git a/dashboard/components/charts/top-apps.tsx b/dashboard/components/charts/top-apps.tsx
index 795fc6c..cc4dd60 100644
--- a/dashboard/components/charts/top-apps.tsx
+++ b/dashboard/components/charts/top-apps.tsx
@@ -6,6 +6,8 @@ import useSWR from "swr"
import fetcher from "@/lib/fetcher"
+import { Error } from "../error"
+import { Loader } from "../loader"
import { ChartCard } from "./chart-card"
interface TopAppsProps {
@@ -13,9 +15,19 @@ interface TopAppsProps {
}
export default function TopApps({ className }: TopAppsProps) {
- const [range, setRange] = useState("ALL")
+ const [range, setRange] = useState("1D")
const queryString = `/api/analystics/topapps?range=${range}`
- const { data, error } = useSWR(queryString, fetcher)
+ const { data: rawData, error } = useSWR(queryString, fetcher)
+ if (error) return
+ if (!rawData) return
+
+ // only get name, value from data
+ const data: any = rawData.map((item: any) => {
+ return {
+ name: item.name,
+ value: item.value,
+ }
+ })
return (
+
+
+ Daily Apps
+
+
+
+
+
+
+
+ {dailyApps.map((app) => (
+
+
+
+
+ {app.name}
+
+ {app.description}
+
+
+
+
+
+
+
+ ))}
+
+
+
+ )
+}
diff --git a/dashboard/components/footer.tsx b/dashboard/components/footer.tsx
index 3b7d841..5b391af 100644
--- a/dashboard/components/footer.tsx
+++ b/dashboard/components/footer.tsx
@@ -1,11 +1,10 @@
+import Image from "next/image"
import Link from "next/link"
import { FaTelegram } from "react-icons/fa"
import { FaXTwitter } from "react-icons/fa6"
import { siteConfig } from "@/config/site"
-import { Icons } from "./icons"
-
const navigation = [
{
name: "Twitter",
@@ -13,9 +12,9 @@ const navigation = [
icon: ,
},
{
- name: "Lenster",
+ name: "Hey",
href: siteConfig.links.lenster,
- icon: ,
+ icon: ,
},
{
name: "Telegram",
diff --git a/dashboard/components/icons.tsx b/dashboard/components/icons.tsx
index 06e9673..498cc9c 100644
--- a/dashboard/components/icons.tsx
+++ b/dashboard/components/icons.tsx
@@ -63,7 +63,7 @@ export const Icons = {
),
- hey: (props: IconProps) => (
+ lenster: (props: IconProps) => (