Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Hide disclaimer if FF is enabled #3668

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const dialogButtons = computed((): LayoutDialogButton[] => [
}
},
{
text: 'I Understand',
text: 'I understand',
onClick: () => {
open.value = false
emit('confirm')
Expand Down
8 changes: 8 additions & 0 deletions packages/frontend-2/composables/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ export const useIsWorkspacesSsoEnabled = () => {
return ref(FF_WORKSPACES_SSO_ENABLED)
}

export const useIsWorkspacesMultiRegionBlobStorageEnabled = () => {
const {
public: { FF_WORKSPACES_MULTI_REGION_BLOB_STORAGE_ENABLED }
} = useRuntimeConfig()

return ref(FF_WORKSPACES_MULTI_REGION_BLOB_STORAGE_ENABLED)
}

export const useIsMultipleEmailsEnabled = () => {
const {
public: { FF_MULTIPLE_EMAILS_MODULE_ENABLED }
Expand Down
4 changes: 3 additions & 1 deletion packages/frontend-2/lib/workspaces/composables/region.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export const useWorkspaceCustomDataResidencyDisclaimer = <
onConfirmAction: (...args: ConfirmArgs) => MaybeAsync<void>
}) => {
const { onConfirmAction, workspace } = params
const isWorkspacesMultiRegionBlobStorageEnabled =
useIsWorkspacesMultiRegionBlobStorageEnabled()
const showRegionStaticDataDisclaimer = ref(false)
const storedArgs = shallowRef<ConfirmArgs>()

Expand All @@ -50,7 +52,7 @@ export const useWorkspaceCustomDataResidencyDisclaimer = <
* Trigger the actual action that requires the user to confirm the data residency disclaimer
*/
const triggerAction = (...args: ConfirmArgs) => {
if (!hasCustomDataResidency.value) {
if (!hasCustomDataResidency.value || isWorkspacesMultiRegionBlobStorageEnabled) {
onConfirmAction(...args)
} else {
storedArgs.value = args
Expand Down