drawDB/src/pages/LandingPage.jsx

33 lines
1.0 KiB
React
Raw Normal View History

2023-09-30 15:12:09 +08:00
import React, { useState, useEffect } from "react";
2023-09-19 20:47:04 +08:00
import { Link } from "react-router-dom";
2023-09-19 20:51:40 +08:00
import { IconCrossStroked } from "@douyinfe/semi-icons";
2023-10-24 18:04:33 +08:00
import Navbar from "../components/Navbar";
2023-10-27 01:26:13 +08:00
2023-09-19 20:47:04 +08:00
export default function LandingPage() {
2023-09-19 20:51:40 +08:00
const [showSurvey, setShowSurvey] = useState(true);
2023-10-24 18:04:33 +08:00
useEffect(() => {
document.body.setAttribute("theme-mode", "light");
document.title =
"drawDB | Online database diagram editor and SQL generator";
});
2023-09-30 15:12:09 +08:00
2023-09-19 20:47:04 +08:00
return (
<div>
2023-09-19 20:51:40 +08:00
{showSurvey && (
<div className="text-white font-semibold py-1.5 px-4 text-sm text-center bg-gradient-to-r from-slate-700 from-10% via-slate-500 via-30% to-90% to-slate-700">
<Link to="/survey" className="hover:underline">
Help us improve! Share your feedback.
</Link>
<div className="float-right">
<button onClick={() => setShowSurvey(false)}>
<IconCrossStroked size="small" />
</button>
</div>
</div>
)}
2023-10-24 18:04:33 +08:00
<Navbar />
2023-09-19 20:47:04 +08:00
</div>
);
}