Browse Source

feat - project setup done for first build

main
khanshanawaz10 3 months ago
parent
commit
b5d2ebdf88
6 changed files with 57 additions and 2 deletions
  1. +6
    -0
      netlify.toml
  2. +1
    -0
      next.config.js
  3. +9
    -0
      package-lock.json
  4. +3
    -1
      package.json
  5. +1
    -0
      public/_redirects
  6. +37
    -1
      src/pages/dashboard.tsx

+ 6
- 0
netlify.toml View File

@ -0,0 +1,6 @@
[build]
command = "npm run build"
publish = ".next"
[[plugins]]
package = "@netlify/plugin-nextjs"

+ 1
- 0
next.config.js View File

@ -1,6 +1,7 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
reactStrictMode: true, reactStrictMode: true,
// output: 'export',
// If you want to add any API routes, middleware, or special configs, add here // If you want to add any API routes, middleware, or special configs, add here
}; };


+ 9
- 0
package-lock.json View File

@ -8,6 +8,7 @@
"name": "google-events-dashboard", "name": "google-events-dashboard",
"version": "0.1.0", "version": "0.1.0",
"dependencies": { "dependencies": {
"@netlify/plugin-nextjs": "^5.11.2",
"@supabase/supabase-js": "^2.39.0", "@supabase/supabase-js": "^2.39.0",
"axios": "^1.9.0", "axios": "^1.9.0",
"chart.js": "^4.4.0", "chart.js": "^4.4.0",
@ -899,6 +900,14 @@
"@tybys/wasm-util": "^0.9.0" "@tybys/wasm-util": "^0.9.0"
} }
}, },
"node_modules/@netlify/plugin-nextjs": {
"version": "5.11.2",
"resolved": "https://registry.npmjs.org/@netlify/plugin-nextjs/-/plugin-nextjs-5.11.2.tgz",
"integrity": "sha512-9Hgd/J5nP2U/Vv0teytq9uUAGppiKV9t5tzpsuMLqeqUGD9STxXwKmyZd2v8Z4THSW9rw4+8w7dH7LVlFoym2A==",
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@next/env": { "node_modules/@next/env": {
"version": "14.2.29", "version": "14.2.29",
"resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.29.tgz", "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.29.tgz",


+ 3
- 1
package.json View File

@ -6,9 +6,11 @@
"dev": "next dev", "dev": "next dev",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"lint": "next lint"
"lint": "next lint",
"export": "next export"
}, },
"dependencies": { "dependencies": {
"@netlify/plugin-nextjs": "^5.11.2",
"@supabase/supabase-js": "^2.39.0", "@supabase/supabase-js": "^2.39.0",
"axios": "^1.9.0", "axios": "^1.9.0",
"chart.js": "^4.4.0", "chart.js": "^4.4.0",


+ 1
- 0
public/_redirects View File

@ -0,0 +1 @@
/* /index.html 200

+ 37
- 1
src/pages/dashboard.tsx View File

@ -165,6 +165,7 @@ const Dashboard: React.FC = () => {
</div> </div>
); );
} }
console.log(events, "DKDDKOOKDKDOKDK");
return ( return (
<div className="space-y-6 animate-fade-in"> <div className="space-y-6 animate-fade-in">
@ -226,7 +227,42 @@ const Dashboard: React.FC = () => {
</div> </div>
{/* Recent Events Table */} {/* Recent Events Table */}
<EventTable events={events} />
{/* <EventTable events={events} /> */}
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
{events?.map((items, idx) => (
<EventCountCard
title={items?.eventname}
count={items.count}
icon={<Activity size={24} className="text-white" />}
color="bg-primary-500"
change={12}
/>
))}
{/*
<EventCountCard
title="Signups"
count={eventCounts['signup'] || 0}
icon={<Users size={24} className="text-white" />}
color="bg-success-500"
change={5}
/>
<EventCountCard
title="Purchases"
count={eventCounts['purchase'] || 0}
icon={<ShoppingCart size={24} className="text-white" />}
color="bg-accent-500"
change={-3}
/>
<EventCountCard
title="Logins"
count={eventCounts['login'] || 0}
icon={<LogIn size={24} className="text-white" />}
color="bg-secondary-500"
change={8}
/> */}
</div>
</div> </div>
); );
}; };


Loading…
Cancel
Save

Powered by TurnKey Linux.