From 5e0be4c26db6b048d71aa693e9198d65dac47038 Mon Sep 17 00:00:00 2001 From: Strider Wilson Date: Tue, 10 Jun 2025 14:13:14 -0400 Subject: [PATCH] lint --- .../header/DeployChat/DeployChatButton.tsx | 2 +- .../DeployChat/components/DeployChatModal.tsx | 256 +++++++++--------- .../components/DeploymentSuccessful.tsx | 56 ++-- 3 files changed, 163 insertions(+), 151 deletions(-) diff --git a/app/components/header/DeployChat/DeployChatButton.tsx b/app/components/header/DeployChat/DeployChatButton.tsx index cc3cea6c..336f8977 100644 --- a/app/components/header/DeployChat/DeployChatButton.tsx +++ b/app/components/header/DeployChat/DeployChatButton.tsx @@ -53,7 +53,7 @@ export function DeployChatButton() { const zipContents = event.target.result as string; const directoryToFind = 'supabase'; - + if (zipContents.includes(directoryToFind)) { setDatabaseFound(true); } else { diff --git a/app/components/header/DeployChat/components/DeployChatModal.tsx b/app/components/header/DeployChat/components/DeployChatModal.tsx index 172ea525..e2510b17 100644 --- a/app/components/header/DeployChat/components/DeployChatModal.tsx +++ b/app/components/header/DeployChat/components/DeployChatModal.tsx @@ -35,16 +35,21 @@ const DeployChatModal = ({ className="fixed inset-0 bg-black bg-opacity-50 backdrop-blur-sm z-40 flex items-center justify-center" onClick={handleOverlayClick} > -
e.stopPropagation()}> +
e.stopPropagation()} + > {status === DeployStatus.Succeeded ? ( - - ) : ( + + ) : ( <>

Deploy Your Application

-

Deploy your chat application to production using Netlify{databaseFound ? ' and Supabase' : ''}.

+

+ Deploy your chat application to production using Netlify{databaseFound ? ' and Supabase' : ''}. +

This process will:

    @@ -59,25 +64,28 @@ const DeployChatModal = ({

    Before you begin:

    - You'll need accounts with both Netlify and {databaseFound ? 'Supabase ' : ''}to deploy your application. If you haven't already, please sign up using the links below: + You'll need accounts with both Netlify and {databaseFound ? 'Supabase ' : ''}to deploy your + application. If you haven't already, please sign up using the links below:

    @@ -215,121 +223,121 @@ const DeployChatModal = ({ {databaseFound && ( <> -
    - -
    -

    - The URL of your Supabase project, used to connect to your database. -

    -
    - { - const supabase = { - databaseURL: e.target.value, - anonKey: deploySettings?.supabase?.anonKey || '', - serviceRoleKey: deploySettings?.supabase?.serviceRoleKey || '', - postgresURL: deploySettings?.supabase?.postgresURL || '', - }; - setDeploySettings({ - ...deploySettings, - supabase, - }); - }} - /> +
    + +
    +

    + The URL of your Supabase project, used to connect to your database. +

    + { + const supabase = { + databaseURL: e.target.value, + anonKey: deploySettings?.supabase?.anonKey || '', + serviceRoleKey: deploySettings?.supabase?.serviceRoleKey || '', + postgresURL: deploySettings?.supabase?.postgresURL || '', + }; + setDeploySettings({ + ...deploySettings, + supabase, + }); + }} + /> +
    -
    - -
    -

    - Public API key for client-side database access with restricted permissions. -

    -
    - { - const supabase = { - databaseURL: deploySettings?.supabase?.databaseURL || '', - anonKey: e.target.value, - serviceRoleKey: deploySettings?.supabase?.serviceRoleKey || '', - postgresURL: deploySettings?.supabase?.postgresURL || '', - }; - setDeploySettings({ - ...deploySettings, - supabase, - }); - }} - /> +
    + +
    +

    + Public API key for client-side database access with restricted permissions. +

    + { + const supabase = { + databaseURL: deploySettings?.supabase?.databaseURL || '', + anonKey: e.target.value, + serviceRoleKey: deploySettings?.supabase?.serviceRoleKey || '', + postgresURL: deploySettings?.supabase?.postgresURL || '', + }; + setDeploySettings({ + ...deploySettings, + supabase, + }); + }} + /> +
    -
    - -
    -

    - Admin API key for server-side operations with full database access. -

    -
    - { - const supabase = { - databaseURL: deploySettings?.supabase?.databaseURL || '', - anonKey: deploySettings?.supabase?.anonKey || '', - serviceRoleKey: e.target.value, - postgresURL: deploySettings?.supabase?.postgresURL || '', - }; - setDeploySettings({ - ...deploySettings, - supabase, - }); - }} - /> +
    + +
    +

    + Admin API key for server-side operations with full database access. +

    + { + const supabase = { + databaseURL: deploySettings?.supabase?.databaseURL || '', + anonKey: deploySettings?.supabase?.anonKey || '', + serviceRoleKey: e.target.value, + postgresURL: deploySettings?.supabase?.postgresURL || '', + }; + setDeploySettings({ + ...deploySettings, + supabase, + }); + }} + /> +
    -
    - -
    -

    - Direct connection URL to your Postgres database for advanced operations. -

    -
    - { - const supabase = { - databaseURL: deploySettings?.supabase?.databaseURL || '', - anonKey: deploySettings?.supabase?.anonKey || '', - serviceRoleKey: deploySettings?.supabase?.serviceRoleKey || '', - postgresURL: e.target.value, - }; - setDeploySettings({ - ...deploySettings, - supabase, - }); - }} - /> +
    + +
    +

    + Direct connection URL to your Postgres database for advanced operations. +

    + { + const supabase = { + databaseURL: deploySettings?.supabase?.databaseURL || '', + anonKey: deploySettings?.supabase?.anonKey || '', + serviceRoleKey: deploySettings?.supabase?.serviceRoleKey || '', + postgresURL: e.target.value, + }; + setDeploySettings({ + ...deploySettings, + supabase, + }); + }} + /> +
    )}
    diff --git a/app/components/header/DeployChat/components/DeploymentSuccessful.tsx b/app/components/header/DeployChat/components/DeploymentSuccessful.tsx index fa6f7bcb..d56d986a 100644 --- a/app/components/header/DeployChat/components/DeploymentSuccessful.tsx +++ b/app/components/header/DeployChat/components/DeploymentSuccessful.tsx @@ -1,29 +1,33 @@ -const DeploymentSuccessful = ({ deploySettings, setIsModalOpen }: { deploySettings: any, setIsModalOpen: (isOpen: boolean) => void }) => { - return ( - <> -

    - Deployment Succeeded! 🎉 -

    -
    -

    - Your application has been successfully deployed. You can now access it at the URL below. -

    -
    - - - - -
    -
    - - ); +const DeploymentSuccessful = ({ + deploySettings, + setIsModalOpen, +}: { + deploySettings: any; + setIsModalOpen: (isOpen: boolean) => void; +}) => { + return ( + <> +

    Deployment Succeeded! 🎉

    +
    +

    + Your application has been successfully deployed. You can now access it at the URL below. +

    +
    + + + + +
    +
    + + ); }; export default DeploymentSuccessful;