Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions src/app/(dashboard)/_components/app-sidebar-links.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
Earth,
PieChart,
Users,
ChartColumnIncreasing
ChartColumnIncreasing, MessageCircleQuestion
} from "lucide-react";

const userSidebar: SidebarData = {
Expand Down Expand Up @@ -55,7 +55,14 @@ const userSidebar: SidebarData = {
title: "StockMarket Prediction",
url: "/dashboard/stockmarketprediction",
icon: ChartColumnIncreasing
}]
}],
guides: [
{
name: "User Manual",
url: "/manual",
icon: MessageCircleQuestion,
},
],
}

const adminSidebar: SidebarData = {
Expand Down Expand Up @@ -103,6 +110,11 @@ const adminSidebar: SidebarData = {
}
],
guides: [
{
name: "User Manual",
url: "/manual",
icon: MessageCircleQuestion,
},
{
name: "Documentation",
url: "/docs",
Expand Down
70 changes: 70 additions & 0 deletions src/app/(dashboard)/manual/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
"use client";

import {useEffect} from 'react';
import {motion} from "framer-motion";
import {Loader2} from "lucide-react"; // Changed icon to something more docs-related, or keep Loader2

export default function DocsRedirectPage() { // Renamed component for clarity
const swaggerDocsUrl = `https://drive.google.com/file/d/1ksHsBuDCPHkhI3spcW2eGf9L5dJt4FqA/view?usp=sharing`; // Use the constant for the backend URL

useEffect(() => {
// Wait for a short period (e.g., 1.5 seconds) and then redirect
const timer = setTimeout(() => {
window.location.href = swaggerDocsUrl;
}, 1500); // Adjust delay as needed

// Cleanup function to clear the timer if the component unmounts
return () => clearTimeout(timer);
}, [swaggerDocsUrl]); // Add swaggerDocsUrl to dependency array if it could change, though it's constant here

return (
<div className="h-full w-full flex flex-col items-center justify-center bg-background text-foreground">
<motion.div
initial={{opacity: 0, y: 20}}
animate={{opacity: 1, y: 0}}
transition={{duration: 0.5}}
className="flex flex-col items-center gap-4 p-6 rounded-lg shadow-xl bg-card" // Added some card styling
>
<motion.div
animate={{
rotate: 360
}}
transition={{
duration: 1,
repeat: Infinity,
ease: "linear"
}}
>
{/* You can use Loader2 or a more specific icon like BookOpenCheck */}
<Loader2 className="h-12 w-12 text-primary"/>
{/* <BookOpenCheck className="h-12 w-12 text-primary" /> */}
</motion.div>
<motion.h1
className="text-2xl font-bold text-primary"
initial={{opacity: 0}}
animate={{opacity: 1}}
transition={{delay: 0.2, duration: 0.5}}
>
Redirecting to API Docs
</motion.h1>
<motion.p
className="text-muted-foreground text-center"
initial={{opacity: 0}}
animate={{opacity: 1}}
transition={{delay: 0.4, duration: 0.5}}
>
Please wait while we take you to the Swagger UI for our API.
</motion.p>
<motion.a
href={swaggerDocsUrl}
className="text-sm text-accent-foreground hover:underline mt-2"
initial={{opacity: 0}}
animate={{opacity: 1}}
transition={{delay: 0.6, duration: 0.5}}
>
Click here if you are not redirected automatically.
</motion.a>
</motion.div>
</div>
);
}
6 changes: 4 additions & 2 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,10 @@ export default function Home() {
<span className="font-bold text-xl">IntelliFinance</span>
</Link>
<div className="flex gap-6">
<a href="#" className="text-sm text-muted-foreground hover:text-primary">Privacy Policy</a>
<a href="#" className="text-sm text-muted-foreground hover:text-primary">Terms of Use</a>
<a href="https://drive.google.com/file/d/1ilXlM7wlYHSlhlOR7h787xepN_y4uhEu/view?usp=sharing"
className="text-sm text-muted-foreground hover:text-primary">Privacy Policy</a>
<a href="https://drive.google.com/file/d/1BB_hdko_M7dNI7gjkC9YICgRLn3H54wy/view?usp=sharing"
className="text-sm text-muted-foreground hover:text-primary">Terms of Use</a>
</div>
</div>
<div className="mt-8 pt-6 border-t text-center text-sm text-muted-foreground">
Expand Down