feat: meta component

This commit is contained in:
zerosoul
2022-04-12 09:33:42 +08:00
parent 365a14cdfa
commit 1dcf757920
3 changed files with 20 additions and 5 deletions
+18
View File
@@ -0,0 +1,18 @@
// import React from 'react'
import { Helmet } from "react-helmet";
import BASE_URL from "../../app/config";
import { useGetServerQuery } from "../../app/services/server";
export default function Meta() {
const { data, isSuccess } = useGetServerQuery();
return (
<>
<Helmet>
<link rel="icon" href={`${BASE_URL}/resource/organization/logo`} />
{isSuccess && <title>{data.name} Web App</title>}
</Helmet>
</>
);
}