Skip to content
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
278 changes: 0 additions & 278 deletions src/components/support/RequestInstitution.js

This file was deleted.

23 changes: 2 additions & 21 deletions src/components/support/Support.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ import { useSelector } from 'react-redux'
import { useTokens } from '@kyper/tokenprovider'

import { SupportMenu } from 'src/components/support/SupportMenu'
import { RequestInstitution } from 'src/components/support/RequestInstitution'
import { GeneralSupport } from 'src/components/support/GeneralSupport'
import { SupportSuccess } from 'src/components/support/SupportSuccess'
import { AriaLive } from 'src/components/AriaLive'
import { fadeOut } from 'src/utilities/Animation'

export const VIEWS = {
MENU: 'menu',
REQ_INSTITUTION: 'reqInstitution',
GENERAL_SUPPORT: 'generalSupport',
SUCCESS: 'success',
}
Expand All @@ -24,7 +22,6 @@ export const Support = React.forwardRef((props, supportNavRef) => {
const [ariaLiveRegionMessage, setAriaLiveRegionMessage] = useState('')
const user = useSelector((state) => state.profiles.user)
const menuRef = useRef(null)
const requestInstitutionRef = useRef(null)
const generalSupportRef = useRef(null)
const supportSuccessRef = useRef(null)
const tokens = useTokens()
Expand All @@ -34,9 +31,7 @@ export const Support = React.forwardRef((props, supportNavRef) => {
return {
handleCloseSupport() {
if (loadToView !== VIEWS.MENU) {
if (currentView === VIEWS.REQ_INSTITUTION) {
handleCloseSupport(requestInstitutionRef)
} else if (currentView === VIEWS.GENERAL_SUPPORT) {
if (currentView === VIEWS.GENERAL_SUPPORT) {
handleCloseSupport(generalSupportRef)
} else if (currentView === VIEWS.SUCCESS) {
handleCloseSupport(supportSuccessRef)
Expand Down Expand Up @@ -65,20 +60,6 @@ export const Support = React.forwardRef((props, supportNavRef) => {
<SupportMenu
ref={menuRef}
selectGeneralSupport={() => setCurrentView(VIEWS.GENERAL_SUPPORT)}
selectRequestInstitution={() => setCurrentView(VIEWS.REQ_INSTITUTION)}
/>
)}

{currentView === VIEWS.REQ_INSTITUTION && (
<RequestInstitution
handleClose={() =>
loadToView !== VIEWS.MENU
? handleCloseSupport(requestInstitutionRef)
: setCurrentView(VIEWS.MENU)
}
handleTicketSuccess={handleTicketSuccess}
ref={requestInstitutionRef}
user={user}
/>
)}

Expand Down Expand Up @@ -129,7 +110,7 @@ const getStyles = (tokens) => ({
})

Support.propTypes = {
loadToView: PropTypes.oneOf([VIEWS.MENU, VIEWS.REQ_INSTITUTION, VIEWS.GENERAL_SUPPORT]),
loadToView: PropTypes.oneOf([VIEWS.MENU, VIEWS.GENERAL_SUPPORT]),
onClose: PropTypes.func.isRequired,
}

Expand Down
10 changes: 1 addition & 9 deletions src/components/support/SupportMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import useAnalyticsPath from 'src/hooks/useAnalyticsPath'
import { PageviewInfo } from 'src/const/Analytics'

export const SupportMenu = React.forwardRef((props, menuRef) => {
const { selectGeneralSupport, selectRequestInstitution } = props
const { selectGeneralSupport } = props
useAnalyticsPath(...PageviewInfo.CONNECT_SUPPORT_MENU)
const tokens = useTokens()
const styles = getStyles(tokens)
Expand All @@ -29,13 +29,6 @@ export const SupportMenu = React.forwardRef((props, menuRef) => {
</SlideDown>

<SlideDown delay={getNextDelay()}>
<UtilityRow
borderType="inset-left"
onClick={selectRequestInstitution}
rightChildren={<ChevronRight />}
subTitle={__('Request to have it added')}
title={__("Can't find your bank?")}
/>
<UtilityRow
borderType="inset-left"
onClick={selectGeneralSupport}
Expand All @@ -57,7 +50,6 @@ const getStyles = (tokens) => ({

SupportMenu.propTypes = {
selectGeneralSupport: PropTypes.func.isRequired,
selectRequestInstitution: PropTypes.func.isRequired,
}

SupportMenu.displayName = 'SupportMenu'
Loading
Loading