closes #12
This commit is contained in:
@@ -395,11 +395,17 @@ const ChatPane = ({ showChat, isMinimized, toggleMinimize, closeChat }: ChatPane
|
||||
);
|
||||
};
|
||||
|
||||
const FloatingChatButton = (): ReactElement => {
|
||||
import { features } from 'config/features';
|
||||
|
||||
const FloatingChatButton = (): ReactElement | null => {
|
||||
const [showChat, setShowChat] = useState<boolean>(false);
|
||||
// State to control if the chat pane is minimized
|
||||
const [isMinimized, setIsMinimized] = useState<boolean>(false);
|
||||
|
||||
if (!features.enableFloatingChatButton) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Function to toggle the chat pane visibility
|
||||
const toggleChat = () => {
|
||||
setShowChat(!showChat);
|
||||
|
||||
@@ -9,6 +9,9 @@ interface FeatureConfig {
|
||||
enableRealEstateAgentRegistration: boolean;
|
||||
enableRegistration: boolean;
|
||||
|
||||
// UI Features
|
||||
enableFloatingChatButton: boolean;
|
||||
|
||||
// API Configuration
|
||||
apiUrl: string;
|
||||
|
||||
@@ -28,6 +31,7 @@ const getFeatureConfig = (): FeatureConfig => {
|
||||
enableAttorneyRegistration: false,
|
||||
enableRealEstateAgentRegistration: false,
|
||||
enableRegistration: false,
|
||||
enableFloatingChatButton: false,
|
||||
apiUrl: 'https://backend.ditchtheagent.com/api/',
|
||||
useLiveData: true,
|
||||
};
|
||||
@@ -39,6 +43,7 @@ const getFeatureConfig = (): FeatureConfig => {
|
||||
enableAttorneyRegistration: true,
|
||||
enableRealEstateAgentRegistration: true,
|
||||
enableRegistration: true,
|
||||
enableFloatingChatButton: true,
|
||||
apiUrl: 'https://beta.backend.ditchtheagent.com/api/',
|
||||
useLiveData: true,
|
||||
};
|
||||
@@ -49,6 +54,7 @@ const getFeatureConfig = (): FeatureConfig => {
|
||||
enableAttorneyRegistration: true,
|
||||
enableRealEstateAgentRegistration: true,
|
||||
enableRegistration: true,
|
||||
enableFloatingChatButton: true,
|
||||
apiUrl: 'http://127.0.0.1:8010/api/',
|
||||
useLiveData: false,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user