feat(migration): moved changed log and properly added in the link to it
This commit is contained in:
34
frontend/src/components/changelog/ChangeLog.tsx
Normal file
34
frontend/src/components/changelog/ChangeLog.tsx
Normal file
@@ -0,0 +1,34 @@
|
||||
// src/components/Changelog.jsx
|
||||
|
||||
import { marked } from "marked";
|
||||
import changelog from "../../../../CHANGELOG.md?raw"; // assuming changelog.md is in root ?raw
|
||||
|
||||
const Changelog = () => {
|
||||
const html: any = marked.parse(changelog);
|
||||
const recentChanges = html.split("<h2>")[1];
|
||||
// const [htmlContent, setHtmlContent] = useState("");
|
||||
|
||||
// useEffect(() => {
|
||||
// fetch("/changelog.md")
|
||||
// .then((res) => res.text())
|
||||
// .then((md) => {
|
||||
// const versionBlocks = md.split(/^##\s+/gm); // Split on headings
|
||||
// if (versionBlocks.length > 1) {
|
||||
// const latestBlock = `## ${versionBlocks[1]}`;
|
||||
// const html: any = marked.parse(latestBlock, {
|
||||
// breaks: true,
|
||||
// gfm: true,
|
||||
// });
|
||||
// setHtmlContent(html);
|
||||
// }
|
||||
// });
|
||||
// }, []);
|
||||
return (
|
||||
<div
|
||||
className="prose m-3"
|
||||
dangerouslySetInnerHTML={{ __html: `<h2>${recentChanges}` }}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default Changelog;
|
||||
@@ -28,7 +28,9 @@ export default function Nav() {
|
||||
</a>
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<Button className="m-1">
|
||||
<Link to="/old">Old Version</Link>
|
||||
</Button>
|
||||
{session ? (
|
||||
<div className="m-1">
|
||||
<DropdownMenu>
|
||||
@@ -49,9 +51,7 @@ export default function Nav() {
|
||||
<DropdownMenuItem>
|
||||
<Link to="/user/profile">Profile</Link>
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem>
|
||||
<Link to="/old">LST-Old</Link>
|
||||
</DropdownMenuItem>
|
||||
|
||||
{/* <DropdownMenuItem>Billing</DropdownMenuItem>
|
||||
<DropdownMenuItem>Team</DropdownMenuItem>
|
||||
<DropdownMenuItem>Subscription</DropdownMenuItem> */}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { Link } from "@tanstack/react-router";
|
||||
import { userAccess } from "../../lib/authClient";
|
||||
import {
|
||||
Sidebar,
|
||||
SidebarContent,
|
||||
SidebarFooter,
|
||||
SidebarMenuItem,
|
||||
SidebarTrigger,
|
||||
} from "../ui/sidebar";
|
||||
import Admin from "./Admin";
|
||||
@@ -18,6 +20,9 @@ export default function SideBarNav() {
|
||||
</SidebarContent>
|
||||
|
||||
<SidebarFooter>
|
||||
<SidebarMenuItem>
|
||||
<Link to={"/changelog"}>Changelog</Link>
|
||||
</SidebarMenuItem>
|
||||
<SidebarTrigger />
|
||||
</SidebarFooter>
|
||||
</Sidebar>
|
||||
|
||||
Reference in New Issue
Block a user