Skip to content

Commit ee6fe1e

Browse files
committed
fix: ts issues
1 parent 3810262 commit ee6fe1e

File tree

14 files changed

+347
-138
lines changed

14 files changed

+347
-138
lines changed

apps/api/src/modules/statuses/status.controller.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ export default class StatusController {
7171
request.params.statusId,
7272
request.body
7373
);
74+
console.log("🟥Updated Status:", status);
7475

75-
return reply.send({ status });
76+
return reply.send({ status }).code(200);
7677
}
7778

7879
async deleteStatus(

apps/api/src/plugins/cors.ts

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
import type { FastifyInstance } from "fastify";
21
import { fastifyCors } from "@fastify/cors";
2+
import type { FastifyInstance } from "fastify";
33
import { fastifyPlugin } from "fastify-plugin";
44

55
export default fastifyPlugin(
6-
async (fastify: FastifyInstance) => {
7-
const corsFromEnv =
8-
process.env.CORS_ORIGIN_LIST?.split(",").filter(
9-
(url) => url.length > 5,
10-
) ?? [];
11-
12-
await fastify.register(fastifyCors, {
13-
credentials: true,
14-
origin: corsFromEnv,
15-
});
16-
},
17-
{ name: "cors", dependencies: ["env-config"] },
6+
async (fastify: FastifyInstance) => {
7+
const corsFromEnv = process.env.CORS_ORIGIN_LIST?.split(",").filter(
8+
(url) => url.length > 5
9+
) ?? ["http://localhost:5173"];
10+
await fastify.register(fastifyCors, {
11+
credentials: true,
12+
origin: corsFromEnv,
13+
});
14+
},
15+
{ name: "cors", dependencies: ["env-config"] }
1816
);

apps/api/src/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { generateMigration, runMigrations } from "@taskcord/database";
1+
import { runMigrations } from "@taskcord/database";
22
import * as dotenv from "dotenv";
33
import type { FastifyInstance, FastifyServerOptions } from "fastify";
44
import Fastify from "fastify";
@@ -71,7 +71,7 @@ export const startServer = async (): Promise<FastifyInstance> => {
7171
await fastifyServer.cacheDb.ping();
7272

7373
// await checkConnection();
74-
await generateMigration();
74+
// await generateMigration();
7575
await runMigrations();
7676

7777
await fastifyServer.listen({ port: Number(port), host: "0.0.0.0" });

apps/dashboard/index.html

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<!doctype html>
22
<html lang="en">
3+
34
<head>
45
<meta charset="UTF-8" />
56
<link rel="icon" type="image/png" href="/logo_128.png" />
@@ -8,38 +9,27 @@
89
<!-- Primary Meta Tags -->
910
<title>Taskcord - Project Management Made Simple</title>
1011
<meta name="title" content="Taskcord - Project Management with Discord Made Simple" />
11-
<meta
12-
name="description"
13-
content="Streamline your project management with Taskcord. Collaborate seamlessly, track tasks efficiently, and boost productivity with our intuitive platform."
14-
/>
12+
<meta name="description"
13+
content="Streamline your project management with Taskcord. Collaborate seamlessly, track tasks efficiently, and boost productivity with our intuitive platform." />
1514

1615
<!-- Keywords -->
17-
<meta
18-
name="keywords"
19-
content="project management, task tracking, team collaboration, productivity tools, workflow management, Taskcord"
20-
/>
16+
<meta name="keywords"
17+
content="project management, task tracking, team collaboration, productivity tools, workflow management, Taskcord" />
2118

2219
<!-- Open Graph / Facebook -->
2320
<meta property="og:type" content="website" />
2421
<meta property="og:url" content="https://p005.netlify.app" />
2522
<meta property="og:title" content="Taskcord - Project Management with Discord Made Simple" />
26-
<meta
27-
property="og:description"
28-
content="Streamline your project management with Taskcord. Collaborate seamlessly, track tasks efficiently, and boost productivity with our intuitive platform."
29-
/>
23+
<meta property="og:description"
24+
content="Streamline your project management with Taskcord. Collaborate seamlessly, track tasks efficiently, and boost productivity with our intuitive platform." />
3025
<meta property="og:image" content="https://p005.netlify.app/og-image.jpg" />
3126

3227
<!-- Twitter -->
3328
<meta property="twitter:card" content="summary_large_image" />
3429
<meta property="twitter:url" content="https://p005.netlify.app" />
35-
<meta
36-
property="twitter:title"
37-
content="Taskcord - Project Management with Discord Made Simple"
38-
/>
39-
<meta
40-
property="twitter:description"
41-
content="Streamline your project management with Taskcord. Collaborate seamlessly, track tasks efficiently, and boost productivity with our intuitive platform."
42-
/>
30+
<meta property="twitter:title" content="Taskcord - Project Management with Discord Made Simple" />
31+
<meta property="twitter:description"
32+
content="Streamline your project management with Taskcord. Collaborate seamlessly, track tasks efficiently, and boost productivity with our intuitive platform." />
4333
<meta property="twitter:image" content="https://p005.netlify.app/twitter-image.jpg" />
4434

4535
<!-- Additional Meta Tags -->
@@ -65,4 +55,5 @@
6555
<div id="app"></div>
6656
<script type="module" src="/src/main.tsx"></script>
6757
</body>
68-
</html>
58+
59+
</html>

apps/dashboard/src/App.tsx

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
2+
import { RouterProvider, createRouter } from '@tanstack/react-router';
3+
import ErrorBoundary from '@components/ErrorBoundary';
4+
import PageNotFound from '@components/PageNotFound';
5+
import { ThemeProvider } from '@components/ThemeProvider';
6+
import { SonnerToaster } from '@components/extended-ui/sonner';
7+
import './styles.css';
8+
import { routeTree } from './routeTree.gen';
9+
const queryClient = new QueryClient();
10+
11+
// Create a new router instance
12+
const router = createRouter({
13+
routeTree,
14+
context: {
15+
queryClient,
16+
},
17+
defaultErrorComponent: ErrorBoundary,
18+
defaultNotFoundComponent: PageNotFound,
19+
});
20+
21+
// Register the router instance for type safety
22+
declare module '@tanstack/react-router' {
23+
interface Register {
24+
router: typeof router;
25+
}
26+
}
27+
28+
export const App = () => {
29+
return (
30+
<QueryClientProvider client={queryClient}>
31+
<ThemeProvider>
32+
<SonnerToaster />
33+
<RouterProvider router={router} />
34+
</ThemeProvider>
35+
</QueryClientProvider>
36+
);
37+
};

apps/dashboard/src/components/common/ServerCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const ServerCard: FC<ServerCardProps> = ({
2424
<div className="relative h-44 overflow-hidden rounded-xl bg-gray-900 p-6">
2525
{/* Initial state */}
2626
<div className="absolute inset-0 flex transform flex-col items-center justify-between p-6 transition-all duration-300 group-hover:-translate-x-full">
27-
<div className="h-16 w-16 flex-shrink-0 overflow-hidden rounded-full border-2 border-white/70">
27+
<div className="h-16 w-16 shrink-0 overflow-hidden rounded-full border-2 border-white/70">
2828
<img src={logoUrl} alt={`${name} logo`} className="h-full w-full object-cover" />
2929
</div>
3030
<div className="max-w-full text-center">
@@ -39,7 +39,7 @@ export const ServerCard: FC<ServerCardProps> = ({
3939
<div className="absolute inset-0 flex translate-y-full transform flex-col justify-between p-6 transition-all duration-300 group-hover:translate-y-0">
4040
{/* Top row: Logo, Title, Date */}
4141
<div className="flex items-center space-x-4">
42-
<div className="h-12 w-12 flex-shrink-0 overflow-hidden rounded-full border-2 border-white/10">
42+
<div className="h-12 w-12 shrink-0 overflow-hidden rounded-full border-2 border-white/10">
4343
<img src={logoUrl} alt={`${name} logo`} className="h-full w-full object-cover" />
4444
</div>
4545
<div className="min-w-0 flex-1">

apps/dashboard/src/main.tsx

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,19 @@
1-
import { RouterProvider, createRouter } from '@tanstack/react-router';
21
import { StrictMode } from 'react';
32
import ReactDOM from 'react-dom/client';
43

5-
// Import the generated route tree
6-
import { routeTree } from './routeTree.gen';
74

85
import reportWebVitals from './reportWebVitals.ts';
96
import './styles.css';
7+
import { App } from './App';
108

11-
// Create a new router instance
12-
const router = createRouter({
13-
routeTree,
14-
context: {},
15-
defaultPreload: 'intent',
16-
scrollRestoration: true,
17-
defaultStructuralSharing: true,
18-
defaultPreloadStaleTime: 0,
19-
});
20-
21-
// Register the router instance for type safety
22-
declare module '@tanstack/react-router' {
23-
interface Register {
24-
router: typeof router;
25-
}
26-
}
279

2810
// Render the app
2911
const rootElement = document.getElementById('app');
3012
if (rootElement && !rootElement.innerHTML) {
3113
const root = ReactDOM.createRoot(rootElement);
3214
root.render(
3315
<StrictMode>
34-
<RouterProvider router={router} />
16+
<App />
3517
</StrictMode>
3618
);
3719
}

apps/dashboard/src/pages/landingPage/components/HeroSection.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { DiscordSignIn } from '@/components/common/discord-signin';
22
import { Badge } from '@/components/ui/badge';
3-
import { Button } from '@/components/ui/button';
43
import { motion } from 'framer-motion';
54
import { ArrowRight, Github, Star } from 'lucide-react';
65

@@ -86,14 +85,15 @@ export function HeroSection() {
8685
transition={{ delay: 0.6 }}
8786
className="flex flex-col items-center justify-center gap-4 sm:flex-row"
8887
>
89-
<Button
90-
size="lg"
91-
className="group gap-2 bg-blue-600 px-8 py-6 text-lg font-semibold text-white hover:bg-blue-700"
88+
<a
89+
href={`/onboarding?auth_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkaXNjb3JkSWQiOiI1MjEzMzA5NDgzODI2NTQ0ODciLCJmdWxsTmFtZSI6ImEuc2VocmlrIiwiYXZhdGFyIjoiZGQyMjE1YmQ3ZjM2NjM1Y2EyNTFiZTU1ZWZiNTEyNGIiLCJlbWFpbCI6ImFzZWhyaWtAZ21haWwuY29tIiwiaWQiOiIwMTk5ZjdhOC02MmI4LTcyNmEtYjRkMS0zMjNiOGNjOGVlYTAiLCJpYXQiOjE3NjEzMjk4MjgsImV4cCI6MTc2MTkzNDYyOH0.dcLsDPJTRgJDekiQP_qZmVluux4wTaxtEINrp5PZttU`}
90+
91+
className="group h-fit rounded-3xl flex w-fit gap-2 bg-blue-600 p-3 px-6 text-lg font-semibold text-white hover:bg-blue-700"
9292
>
93-
<Github className="h-5 w-5" />
94-
Sign Up with GitHub
93+
94+
Test Token
9595
<ArrowRight className="h-5 w-5 transition-transform group-hover:translate-x-1" />
96-
</Button>
96+
</a>
9797

9898
<DiscordSignIn className="rounded-md border border-gray-300 p-3" />
9999
</motion.div>

apps/dashboard/src/pages/overview/ActiveProjects.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Card, CardContent } from '@/components/ui/card';
2-
import { SingleProject } from '@/types/project';
2+
import { type SingleProject } from '@/types/project';
33
import { Link } from '@tanstack/react-router';
44
import { type FC } from 'react';
55

apps/dashboard/src/pages/overview/OverviewCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
2-
import { type FC } from 'react';
2+
import { JSX, type FC } from 'react';
33

44
interface LandingDashboardCardProps {
55
title: string;
@@ -9,7 +9,7 @@ interface LandingDashboardCardProps {
99

1010
export const OverviewCard: FC<LandingDashboardCardProps> = ({ title, statData, icon }) => {
1111
return (
12-
<Card className="relative flex flex-1 justify-around gap-2 overflow-hidden p-4">
12+
<Card className="relative flex flex-row flex-1 justify-around gap-2 overflow-hidden p-4">
1313
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_top,#000000_0%,#1F1F1F_100%)]"></div>
1414
<div className="z-10 flex h-full w-full flex-col">
1515
<CardHeader className="p-0">

0 commit comments

Comments
 (0)