import { Metadata } from 'next'; import React from 'react'; export const metadata: Metadata = { title: 'Library - Perplexica', }; const Layout = async ({ children }: { children: React.ReactNode }) => { const res = await fetch( `${process.env.NEXT_PUBLIC_API_URL}/config/preferences`, { method: 'GET', headers: { 'Content-Type': 'application/json', }, }, ); const data = await res.json(); const { isLibraryEnabled } = data; if (!isLibraryEnabled) { return (
Library is disabled