mirror of
https://github.com/usememos/memos.git
synced 2024-12-27 15:42:51 +08:00
chore: remove demo banner
This commit is contained in:
parent
4d54463aeb
commit
7c5fdd1b06
3 changed files with 2 additions and 43 deletions
|
@ -36,7 +36,8 @@ INSERT INTO
|
|||
VALUES
|
||||
(
|
||||
3,
|
||||
"**[yourselfhosted/slash](https://github.com/yourselfhosted/slash)**: An open source, self-hosted bookmarks and link sharing platform. Save and share your links very easily.",
|
||||
'**[Memos](https://github.com/usememos/memos)**: A lightweight, self-hosted memo hub. Open Source and Free forever.
|
||||
**[Slash](https://github.com/yourselfhosted/slash)**: An open source, self-hosted bookmarks and link sharing platform. Save and share your links very easily.',
|
||||
101,
|
||||
'PUBLIC'
|
||||
);
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
import { useEffect, useState } from "react";
|
||||
import { useGlobalStore } from "@/store/module";
|
||||
import Icon from "./Icon";
|
||||
|
||||
interface State {
|
||||
show: boolean;
|
||||
}
|
||||
|
||||
const DemoBanner: React.FC = () => {
|
||||
const globalStore = useGlobalStore();
|
||||
const profile = globalStore.state.systemStatus.profile;
|
||||
const [state, setState] = useState<State>({
|
||||
show: false,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
const isDemo = profile.mode === "demo";
|
||||
setState({
|
||||
show: isDemo,
|
||||
});
|
||||
}, []);
|
||||
|
||||
if (!state.show) return null;
|
||||
|
||||
return (
|
||||
<div className="mt-4 flex flex-row items-center justify-center w-full rounded-lg py-2 text-sm sm:text-lg font-medium dark:text-gray-300 bg-white dark:bg-zinc-700 shadow">
|
||||
<div className="w-full max-w-6xl px-4 flex flex-row justify-between items-center gap-x-3">
|
||||
<span>✨ A lightweight, self-hosted memo hub. Open Source and Free forever. ✨</span>
|
||||
<a className="btn-primary shadow" href="https://usememos.com/docs/install/self-hosting" target="_blank">
|
||||
Install
|
||||
<Icon.ExternalLink className="w-4 h-auto ml-1" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default DemoBanner;
|
|
@ -1,5 +1,4 @@
|
|||
import { Outlet } from "react-router-dom";
|
||||
import DemoBanner from "@/components/DemoBanner";
|
||||
import Navigation from "@/components/Navigation";
|
||||
import useResponsiveWidth from "@/hooks/useResponsiveWidth";
|
||||
|
||||
|
@ -15,9 +14,6 @@ function Root() {
|
|||
</div>
|
||||
)}
|
||||
<main className="w-full sm:px-4 h-auto flex-grow shrink flex flex-col justify-start items-center">
|
||||
<div className="w-full px-4 sm:px-2 h-auto flex flex-col justify-start items-center">
|
||||
<DemoBanner />
|
||||
</div>
|
||||
<Outlet />
|
||||
</main>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue