Skip to content

Commit

Permalink
Remove beta announcement bar
Browse files Browse the repository at this point in the history
Signed-off-by: AbstractionFactory <[email protected]>
Co-Authored-By: Damian Stasik <[email protected]>
  • Loading branch information
abstractionfactory and damianstasik committed Nov 28, 2024
1 parent 195b729 commit b2163ca
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
1 change: 0 additions & 1 deletion frontend/announcement.md
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
This is the **beta** preview of the OpenTofu Registry Search. The data in this interface may not be up to date.
12 changes: 7 additions & 5 deletions frontend/src/components/AnnouncementBar/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import remarkRehype from "remark-rehype";
import rehypeStringify from "rehype-stringify";
import announcement from "../../../announcement.md?raw";

export const content = unified()
.use(remarkParse)
.use(remarkRehype)
.use(rehypeStringify)
.processSync(announcement).value;
export function getContent() {
return unified()
.use(remarkParse)
.use(remarkRehype)
.use(rehypeStringify)
.processSync(announcement).value;
}
6 changes: 5 additions & 1 deletion frontend/src/components/AnnouncementBar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { content } from "./content" with { type: "macro" };
import {getContent} from "@/components/AnnouncementBar/content.ts";

export function AnnouncementBar() {
const content = getContent()
if (!content) {
return null;
}
return (
<div
className="flex h-6 items-center justify-center bg-brand-600 text-sm text-gray-900 [&_a]:underline"
Expand Down

0 comments on commit b2163ca

Please sign in to comment.