Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/app/client-layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { useEffect, useState } from 'react';
import { usePathname } from 'next/navigation';
import { FeedbackWidget } from '@profullstack/stack/feedback';
import { useThemeStore, themeUtils } from '@/lib/stores/theme.js';
import { useI18n } from '@/lib/hooks/useI18n.js';
import { i18nUtils, languages } from '@/lib/stores/i18n.js';
Expand Down Expand Up @@ -62,6 +63,14 @@ export default function ClientLayout({ children }) {
<ActiveCallInterface />
</>
)}
{/* pathname is passed explicitly so hideOnRoutes tracks client-side
navigation — the widget's own detection only reads window.location
on first render, which never re-runs from a root layout. */}
<FeedbackWidget
property="qrypt.chat"
pathname={pathname}
hideOnRoutes={['/chat', '/chats', '/u', '/anon']}
/>
<style>{`
.app {
min-height: 100vh;
Expand Down
3 changes: 1 addition & 2 deletions src/app/layout.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import './globals.css';
import ClientLayout from './client-layout.jsx';
import { FeedbackWidget } from '@profullstack/stack/feedback';
import Script from "next/script";

const SITE_URL = (process.env.NEXT_PUBLIC_APP_URL ?? process.env.NEXT_PUBLIC_BASE_URL ?? 'https://qrypt.chat').replace(/\/$/, '');
Expand Down Expand Up @@ -145,7 +144,7 @@ export default function RootLayout({ children }) {
<body suppressHydrationWarning>
<ClientLayout>{children}</ClientLayout>
<Script data-site="38c4083a-a35e-435d-8a0e-3510c465f419" src="https://crawlproof.com/stats.js" strategy="afterInteractive" />
<FeedbackWidget property="qrypt.chat" hideOnRoutes={['/chat', '/chats', '/u', '/anon']} /></body>
</body>
</html>
);
}
Loading