{"version":3,"file":"useMeta-DcVE8qSD.js","sources":["../../../../../../../../app/frontend/shared/models/hooks/useMeta.ts"],"sourcesContent":["import { usePage } from '@inertiajs/react'\nimport { useMemo } from 'react'\n\nimport { MetaTags } from '~/shared/types/props'\n\nexport const useMeta = () => {\n const { props } = usePage<{ meta: MetaTags }>()\n\n const title = useMemo(() => (props?.meta.title ? props?.meta.title : ''), [props?.meta.title])\n const keywords = useMemo(() => props?.meta?.keywords?.join(',') ?? '', [props?.meta?.keywords])\n const description = useMemo(() => props?.meta?.description ?? '', [props?.meta?.description])\n const canonical = useMemo(() => props?.meta?.canonical ?? '', [props?.meta?.canonical])\n\n return {\n title,\n keywords,\n description,\n canonical,\n }\n}\n"],"names":["useMeta","props","usePage","title","useMemo","keywords","_b","_a","description","canonical","_c"],"mappings":"6DAKO,MAAMA,EAAU,IAAM,WACrB,KAAA,CAAE,MAAAC,GAAUC,IAEZC,EAAQC,EAAAA,QAAQ,IAAOH,GAAA,MAAAA,EAAO,KAAK,MAAQA,GAAA,YAAAA,EAAO,KAAK,MAAQ,GAAK,CAACA,GAAA,YAAAA,EAAO,KAAK,KAAK,CAAC,EACvFI,EAAWD,EAAA,QAAQ,IAAM,SAAA,QAAAE,GAAAC,EAAAN,GAAA,YAAAA,EAAO,OAAP,YAAAM,EAAa,WAAb,YAAAD,EAAuB,KAAK,OAAQ,IAAI,EAACC,EAAAN,GAAA,YAAAA,EAAO,OAAP,YAAAM,EAAa,QAAQ,CAAC,EACxFC,EAAcJ,EAAAA,QAAQ,IAAM,OAAA,QAAAG,EAAAN,GAAA,YAAAA,EAAO,OAAP,YAAAM,EAAa,cAAe,IAAI,EAACD,EAAAL,GAAA,YAAAA,EAAO,OAAP,YAAAK,EAAa,WAAW,CAAC,EACtFG,EAAYL,EAAAA,QAAQ,IAAM,OAAA,QAAAG,EAAAN,GAAA,YAAAA,EAAO,OAAP,YAAAM,EAAa,YAAa,IAAI,EAACG,EAAAT,GAAA,YAAAA,EAAO,OAAP,YAAAS,EAAa,SAAS,CAAC,EAE/E,MAAA,CACL,MAAAP,EACA,SAAAE,EACA,YAAAG,EACA,UAAAC,CAAA,CAEJ"}