From f9040f8beda10b3969572cf8764e49f9b24b222a Mon Sep 17 00:00:00 2001
From: Sebastien Castiel <sebastien@castiel.me>
Date: Thu, 18 Jan 2024 15:46:50 -0500
Subject: Merge feedback and support dialogs

---
 src/app/layout.tsx | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

(limited to 'src/app/layout.tsx')

diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 56fed4f..bff432c 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -1,10 +1,11 @@
-import { DonationButton } from '@/components/donation-button'
+import { FeedbackModal } from '@/components/feedback-button/feedback-button'
 import { ProgressBar } from '@/components/progress-bar'
 import { ThemeProvider } from '@/components/theme-provider'
 import { ThemeToggle } from '@/components/theme-toggle'
 import { Button } from '@/components/ui/button'
 import { Toaster } from '@/components/ui/toaster'
 import { env } from '@/lib/env'
+import { HeartFilledIcon } from '@radix-ui/react-icons'
 import type { Metadata, Viewport } from 'next'
 import PlausibleProvider from 'next-plausible'
 import Image from 'next/image'
@@ -141,13 +142,19 @@ export default function RootLayout({
                     contributors
                   </a>
                 </span>
+                <span>
+                  <FeedbackModal
+                    donationUrl={env.STRIPE_DONATION_LINK}
+                    defaultTab="support"
+                  >
+                    <Button variant="link" className="text-pink-600 -mx-4">
+                      <HeartFilledIcon className="w-4 h-4 mr-2" />
+                      Support us
+                    </Button>
+                  </FeedbackModal>
+                </span>
               </div>
             </div>
-            {env.STRIPE_DONATION_LINK && (
-              <div>
-                <DonationButton donationUrl={env.STRIPE_DONATION_LINK} />
-              </div>
-            )}
           </footer>
           <Toaster />
         </ThemeProvider>
-- 
cgit v1.3

