✨ Add meta title support to all pages (#2039)
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { ReactQueryDevtools } from "@tanstack/react-query-devtools"
|
import { ReactQueryDevtools } from "@tanstack/react-query-devtools"
|
||||||
import { createRootRoute, Outlet } from "@tanstack/react-router"
|
import { createRootRoute, HeadContent, Outlet } from "@tanstack/react-router"
|
||||||
import { TanStackRouterDevtools } from "@tanstack/react-router-devtools"
|
import { TanStackRouterDevtools } from "@tanstack/react-router-devtools"
|
||||||
import ErrorComponent from "@/components/Common/ErrorComponent"
|
import ErrorComponent from "@/components/Common/ErrorComponent"
|
||||||
import NotFound from "@/components/Common/NotFound"
|
import NotFound from "@/components/Common/NotFound"
|
||||||
@@ -7,6 +7,7 @@ import NotFound from "@/components/Common/NotFound"
|
|||||||
export const Route = createRootRoute({
|
export const Route = createRootRoute({
|
||||||
component: () => (
|
component: () => (
|
||||||
<>
|
<>
|
||||||
|
<HeadContent />
|
||||||
<Outlet />
|
<Outlet />
|
||||||
<TanStackRouterDevtools position="bottom-right" />
|
<TanStackRouterDevtools position="bottom-right" />
|
||||||
<ReactQueryDevtools initialIsOpen={false} />
|
<ReactQueryDevtools initialIsOpen={false} />
|
||||||
|
|||||||
@@ -18,6 +18,13 @@ function getUsersQueryOptions() {
|
|||||||
|
|
||||||
export const Route = createFileRoute("/_layout/admin")({
|
export const Route = createFileRoute("/_layout/admin")({
|
||||||
component: Admin,
|
component: Admin,
|
||||||
|
head: () => ({
|
||||||
|
meta: [
|
||||||
|
{
|
||||||
|
title: "Admin - FastAPI Cloud",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
function UsersTableContent() {
|
function UsersTableContent() {
|
||||||
|
|||||||
@@ -4,6 +4,13 @@ import useAuth from "@/hooks/useAuth"
|
|||||||
|
|
||||||
export const Route = createFileRoute("/_layout/")({
|
export const Route = createFileRoute("/_layout/")({
|
||||||
component: Dashboard,
|
component: Dashboard,
|
||||||
|
head: () => ({
|
||||||
|
meta: [
|
||||||
|
{
|
||||||
|
title: "Dashboard - FastAPI Cloud",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
function Dashboard() {
|
function Dashboard() {
|
||||||
@@ -16,7 +23,7 @@ function Dashboard() {
|
|||||||
Hi, {currentUser?.full_name || currentUser?.email} 👋
|
Hi, {currentUser?.full_name || currentUser?.email} 👋
|
||||||
</h1>
|
</h1>
|
||||||
<p className="text-muted-foreground">
|
<p className="text-muted-foreground">
|
||||||
Welcome back, nice to see you again!
|
Welcome back, nice to see you again!!!
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -18,6 +18,13 @@ function getItemsQueryOptions() {
|
|||||||
|
|
||||||
export const Route = createFileRoute("/_layout/items")({
|
export const Route = createFileRoute("/_layout/items")({
|
||||||
component: Items,
|
component: Items,
|
||||||
|
head: () => ({
|
||||||
|
meta: [
|
||||||
|
{
|
||||||
|
title: "Items - FastAPI Cloud",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
function ItemsTableContent() {
|
function ItemsTableContent() {
|
||||||
|
|||||||
@@ -14,6 +14,13 @@ const tabsConfig = [
|
|||||||
|
|
||||||
export const Route = createFileRoute("/_layout/settings")({
|
export const Route = createFileRoute("/_layout/settings")({
|
||||||
component: UserSettings,
|
component: UserSettings,
|
||||||
|
head: () => ({
|
||||||
|
meta: [
|
||||||
|
{
|
||||||
|
title: "Settings - FastAPI Cloud",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
function UserSettings() {
|
function UserSettings() {
|
||||||
|
|||||||
@@ -41,6 +41,13 @@ export const Route = createFileRoute("/login")({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
head: () => ({
|
||||||
|
meta: [
|
||||||
|
{
|
||||||
|
title: "Log In - FastAPI Cloud",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
function Login() {
|
function Login() {
|
||||||
|
|||||||
@@ -39,6 +39,13 @@ export const Route = createFileRoute("/recover-password")({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
head: () => ({
|
||||||
|
meta: [
|
||||||
|
{
|
||||||
|
title: "Recover Password - FastAPI Cloud",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
function RecoverPassword() {
|
function RecoverPassword() {
|
||||||
|
|||||||
@@ -57,6 +57,13 @@ export const Route = createFileRoute("/reset-password")({
|
|||||||
throw redirect({ to: "/login" })
|
throw redirect({ to: "/login" })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
head: () => ({
|
||||||
|
meta: [
|
||||||
|
{
|
||||||
|
title: "Reset Password - FastAPI Cloud",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
function ResetPassword() {
|
function ResetPassword() {
|
||||||
|
|||||||
@@ -48,6 +48,13 @@ export const Route = createFileRoute("/signup")({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
head: () => ({
|
||||||
|
meta: [
|
||||||
|
{
|
||||||
|
title: "Sign Up - FastAPI Cloud",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
function SignUp() {
|
function SignUp() {
|
||||||
|
|||||||
Reference in New Issue
Block a user