This commit is contained in:
Elijah McMorris 2024-02-18 04:50:13 -08:00
parent e4b6b9b86a
commit 51f422874f
Signed by: NexVeridian
SSH key fingerprint: SHA256:bsA1SKZxuEcEVHAy3gY1HUeM5ykRJl0U0kQHQn0hMg8
6 changed files with 25 additions and 20 deletions

View file

@ -6,11 +6,7 @@ import {
CardTitle
} from "@/components/ui/card";
export default function GlobalError({
error,
}: {
error: Error & { digest?: string }
}) {
export default function GlobalError() {
return (
<CardGrid max_rows={1}>
<Card>

View file

@ -6,11 +6,7 @@ import {
CardTitle
} from "@/components/ui/card";
export default function GlobalError({
error,
}: {
error: Error & { digest?: string }
}) {
export default function NotFound() {
return (
<CardGrid max_rows={1}>
<Card>

View file

@ -4,11 +4,12 @@ import { initConnection } from "@/components/db-utils";
export async function querydb() {
try {
let db = await initConnection();
// console.log(db);
let stats = await db.query(`
select * from url
order by clicks desc
limit 50;
`);
select * from url
order by clicks desc
limit 50;
`);
// @ts-ignore
stats = stats[0];

View file

@ -13,7 +13,6 @@ export default function StatsPage() {
useEffect(() => {
const fetchData = async () => {
const result = await querydb();
console.log(result);
// @ts-ignore
setData(result);
};