mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 13:21:37 +02:00
Merge pull request #19961 from overleaf/td-contact-modal-sp-ce-fix
Fix SP and CE builds broken by Contact Us changes GitOrigin-RevId: fb9099ed7d755b30ab8706facd6f0d95aefbad1e
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import importOverleafModules from '../../../macros/import-overleaf-module.macro'
|
||||
import { JSXElementConstructor, useCallback, useState } from 'react'
|
||||
import { HelpSuggestionSearchProvider } from '../../../../modules/support/frontend/js/context/help-suggestion-search-context'
|
||||
|
||||
const [contactUsModalModules] = importOverleafModules('contactUsModal')
|
||||
const ContactUsModal: JSXElementConstructor<{
|
||||
@@ -23,13 +22,11 @@ export const useContactUsModal = (options = { autofillProjectUrl: true }) => {
|
||||
}, [])
|
||||
|
||||
const modal = ContactUsModal && (
|
||||
<HelpSuggestionSearchProvider>
|
||||
<ContactUsModal
|
||||
show={show}
|
||||
handleHide={hideModal}
|
||||
autofillProjectUrl={options.autofillProjectUrl}
|
||||
/>
|
||||
</HelpSuggestionSearchProvider>
|
||||
<ContactUsModal
|
||||
show={show}
|
||||
handleHide={hideModal}
|
||||
autofillProjectUrl={options.autofillProjectUrl}
|
||||
/>
|
||||
)
|
||||
|
||||
return { modal, hideModal, showModal }
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { ComponentProps } from 'react'
|
||||
import useFetchMock from './hooks/use-fetch-mock'
|
||||
import ContactUsModal from '../../modules/support/frontend/js/components/contact-us-modal'
|
||||
import fixedHelpSuggestionSearch from '../../modules/support/test/frontend/util/fixed-help-suggestion-search'
|
||||
import { ScopeDecorator } from './decorators/scope'
|
||||
import { StoryObj } from '@storybook/react'
|
||||
import { FixedHelpSuggestionSearchProvider } from '../../modules/support/test/frontend/helpers/contact-us-modal-base-tests'
|
||||
|
||||
type Story = StoryObj<typeof ContactUsModal>
|
||||
type ContactUsModalProps = ComponentProps<typeof ContactUsModal>
|
||||
@@ -41,9 +41,10 @@ function GenericContactUsModal(args: ContactUsModalProps) {
|
||||
})
|
||||
|
||||
return (
|
||||
<FixedHelpSuggestionSearchProvider>
|
||||
<ContactUsModal {...args} />
|
||||
</FixedHelpSuggestionSearchProvider>
|
||||
<ContactUsModal
|
||||
helpSuggestionSearch={fixedHelpSuggestionSearch}
|
||||
{...args}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -61,9 +62,10 @@ const ContactUsModalWithRequestError = (args: ContactUsModalProps) => {
|
||||
})
|
||||
|
||||
return (
|
||||
<FixedHelpSuggestionSearchProvider>
|
||||
<ContactUsModal {...args} />
|
||||
</FixedHelpSuggestionSearchProvider>
|
||||
<ContactUsModal
|
||||
helpSuggestionSearch={fixedHelpSuggestionSearch}
|
||||
{...args}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user