diff --git a/Dockerfile b/Dockerfile index 6674163a..12951a73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,7 @@ ENV NEXT_TELEMETRY_DISABLED 1 RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs -RUN yarn add npm-run-all dotenv prisma +RUN yarn add npm-run-all dotenv prisma semver # You only need to copy next.config.js if you are NOT using the default configuration COPY --from=builder /app/next.config.js . diff --git a/package.json b/package.json index 8d80de2f..95dba5f3 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "@react-spring/web": "^9.7.3", "@tanstack/react-query": "^4.33.0", "@umami/prisma-client": "^0.3.0", - "@umami/redis-client": "^0.15.0", + "@umami/redis-client": "^0.16.0", "chalk": "^4.1.1", "chart.js": "^4.2.1", "chartjs-adapter-date-fns": "^3.0.0", @@ -93,9 +93,10 @@ "maxmind": "^4.3.6", "moment-timezone": "^0.5.35", "next": "13.5.3", - "next-basics": "^0.36.0", + "next-basics": "^0.37.0", "node-fetch": "^3.2.8", "npm-run-all": "^4.1.5", + "prisma": "5.3.1", "react": "^18.2.0", "react-basics": "^0.105.0", "react-beautiful-dnd": "^13.1.0", @@ -106,7 +107,7 @@ "react-use-measure": "^2.0.4", "react-window": "^1.8.6", "request-ip": "^3.3.0", - "semver": "^7.5.2", + "semver": "^7.5.4", "thenby": "^1.3.4", "timezone-support": "^2.0.2", "uuid": "^9.0.0", @@ -146,7 +147,6 @@ "postcss-preset-env": "7.8.3", "postcss-rtlcss": "^4.0.1", "prettier": "^2.6.2", - "prisma": "5.3.1", "prompts": "2.4.2", "rollup": "^3.28.0", "rollup-plugin-copy": "^3.4.0", diff --git a/src/app/(main)/console/TestConsole.js b/src/app/(main)/console/TestConsole.js index 1ae3eaf1..b88bfd77 100644 --- a/src/app/(main)/console/TestConsole.js +++ b/src/app/(main)/console/TestConsole.js @@ -7,19 +7,15 @@ import WebsiteChart from '../../(main)/websites/[id]/WebsiteChart'; import useApi from 'components/hooks/useApi'; import Head from 'next/head'; import Link from 'next/link'; -import { useRouter } from 'next/navigation'; +import useNavigation from 'components/hooks/useNavigation'; import Script from 'next/script'; import { Button } from 'react-basics'; import styles from './TestConsole.module.css'; -export function TestConsole() { +export function TestConsole({ websiteId }) { const { get, useQuery } = useApi(); const { data, isLoading, error } = useQuery(['websites:me'], () => get('/me/websites')); - const router = useRouter(); - const { - basePath, - query: { id }, - } = router; + const { router } = useNavigation(); function handleChange(value) { router.push(`/console/${value}`); @@ -72,7 +68,6 @@ export function TestConsole() { return null; } - const [websiteId] = id || []; const website = data?.data.find(({ id }) => websiteId === id); return ( @@ -87,8 +82,8 @@ export function TestConsole() { <>