diff --git a/app/routes/explore.$deviceId.tsx b/app/routes/explore.$deviceId.tsx index 1211ee7a..5295e136 100644 --- a/app/routes/explore.$deviceId.tsx +++ b/app/routes/explore.$deviceId.tsx @@ -1,6 +1,7 @@ import { useState } from 'react' import { type LoaderFunctionArgs, + type MetaFunction, Outlet, useLoaderData, useMatches, @@ -85,6 +86,12 @@ export async function loader({ params, request }: LoaderFunctionArgs) { return data } +export const meta: MetaFunction = ({ loaderData }) => { + return [ + { title: `${loaderData?.device?.name}` } + ] +} + // Defining the component that will render the page export default function DeviceId() { // Retrieving the data returned by the loader using the useLoaderData hook