feat(workspace): Add subdomain availability check (#8906)
Implemented a feature to check the availability of subdomains when updating workspace settings. This includes a new mutation, `isSubdomainAvailable`, to validate subdomain availability through GraphQL. The frontend now verifies if a subdomain is available to prevent duplicates during updates. --------- Co-authored-by: Weiko <corentin@twenty.com>
This commit is contained in:
@ -60,20 +60,23 @@ export const cookieStorageEffect =
|
||||
};
|
||||
|
||||
onSet((newValue, _, isReset) => {
|
||||
if (!newValue) {
|
||||
cookieStorage.removeItem(key, defaultAttributes);
|
||||
return;
|
||||
}
|
||||
|
||||
const cookieAttributes = {
|
||||
...defaultAttributes,
|
||||
...(isCustomCookiesAttributesValue(newValue)
|
||||
? newValue.cookieAttributes
|
||||
: {}),
|
||||
};
|
||||
if (
|
||||
!newValue ||
|
||||
(Object.keys(newValue).length === 1 &&
|
||||
isCustomCookiesAttributesValue(newValue))
|
||||
) {
|
||||
cookieStorage.removeItem(key, cookieAttributes);
|
||||
return;
|
||||
}
|
||||
|
||||
isReset
|
||||
? cookieStorage.removeItem(key, defaultAttributes)
|
||||
? cookieStorage.removeItem(key, cookieAttributes)
|
||||
: cookieStorage.setItem(
|
||||
key,
|
||||
JSON.stringify(omit(newValue, ['cookieAttributes'])),
|
||||
|
||||
Reference in New Issue
Block a user