feat: move support links to workspace switcher (#16653)
## Summary Move the Support and Documentation links from the bottom left navigation drawer to the workspace switcher dropdown menu. ## Changes - **Workspace Switcher**: Added Support (conditional) and Documentation links before Log out - **Settings Navigation**: Added Support and Documentation links in the Other section - **Support visibility**: Support link only appears when FrontChat is configured (not waiting for script to load) - **FrontChat loading**: Created `SupportChatEffect` component to ensure FrontChat script loads at app startup for popup notifications - **Bug fix**: Fixed settings navigation items without a path appearing highlighted - **Cleanup**: Removed unused `SupportDropdown`, `SupportButton`, and `SupportButtonSkeletonLoader` components - **Hidden**: Temporarily commented out Integrations page ## Screenshots The Support and Documentation links now appear in: 1. Workspace switcher dropdown (top left) 2. Settings navigation (Other section)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
const DOCUMENTATION_BASE_URL = 'https://docs.twenty.com';
|
||||
const DOCUMENTATION_PATH = '/user-guide/introduction';
|
||||
|
||||
// Locales that have documentation translations available
|
||||
const SUPPORTED_DOC_LOCALES = ['fr', 'pt', 'de', 'es', 'it', 'ja', 'ko', 'zh'];
|
||||
|
||||
export const getDocumentationUrl = (locale?: string | null): string => {
|
||||
if (!locale) {
|
||||
return `${DOCUMENTATION_BASE_URL}${DOCUMENTATION_PATH}`;
|
||||
}
|
||||
|
||||
// Extract language code from locale (e.g., 'fr' from 'fr-FR')
|
||||
const langCode = locale.split('-')[0].toLowerCase();
|
||||
|
||||
if (SUPPORTED_DOC_LOCALES.includes(langCode)) {
|
||||
return `${DOCUMENTATION_BASE_URL}/l/${langCode}${DOCUMENTATION_PATH}`;
|
||||
}
|
||||
|
||||
return `${DOCUMENTATION_BASE_URL}${DOCUMENTATION_PATH}`;
|
||||
};
|
||||
Reference in New Issue
Block a user