diff --git a/.gitignore b/.gitignore index 440f7ecbbc..c3f3e38c93 100644 --- a/.gitignore +++ b/.gitignore @@ -94,4 +94,4 @@ apps/stats-dapp/graphql.schema.json .direnv # Generated by json files -/**/generated/**/*.json +/**/generated/**/*.json \ No newline at end of file diff --git a/apps/hubble-stats/.eslintrc.json b/apps/hubble-stats/.eslintrc.json new file mode 100644 index 0000000000..af23ce730f --- /dev/null +++ b/apps/hubble-stats/.eslintrc.json @@ -0,0 +1,34 @@ +{ + "extends": [ + "plugin:@nx/react-typescript", + "next", + "next/core-web-vitals", + "../../.eslintrc.json" + ], + "ignorePatterns": ["!**/*", ".next/**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": { + "@next/next/no-html-link-for-pages": [ + "error", + "apps/hubble-stats/pages" + ] + } + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ], + "rules": { + "@next/next/no-html-link-for-pages": "off" + }, + "env": { + "jest": true + } +} diff --git a/apps/hubble-stats/.vscode/settings.json b/apps/hubble-stats/.vscode/settings.json new file mode 100644 index 0000000000..d3fdae9a69 --- /dev/null +++ b/apps/hubble-stats/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "typescript.tsdk": "../../node_modules/typescript/lib", + "typescript.enablePromptUseWorkspaceTsdk": true +} \ No newline at end of file diff --git a/apps/hubble-stats/app/api/hello/route.ts b/apps/hubble-stats/app/api/hello/route.ts new file mode 100644 index 0000000000..de70bac64e --- /dev/null +++ b/apps/hubble-stats/app/api/hello/route.ts @@ -0,0 +1,3 @@ +export async function GET(request: Request) { + return new Response('Hello, from API!'); +} diff --git a/apps/hubble-stats/app/layout.tsx b/apps/hubble-stats/app/layout.tsx new file mode 100644 index 0000000000..d1918a032c --- /dev/null +++ b/apps/hubble-stats/app/layout.tsx @@ -0,0 +1,36 @@ +'use client'; + +import { useEffect } from 'react'; +import Head from 'next/head'; +import { + WebbUIProvider, + useDarkMode, + Footer, +} from '@webb-tools/webb-ui-components'; +import '@webb-tools/webb-ui-components/tailwind.css'; + +export default function RootLayout({ + children, +}: { + children: React.ReactNode; +}) { + const [, setIsDarkMode] = useDarkMode(); + + useEffect(() => { + setIsDarkMode('light'); + }, [setIsDarkMode]); + + return ( + + + + Welcome to Hubble Stats! + + + {children} +