diff --git a/contents/home-page/home.yml b/contents/home-page/home.yml index 377f749d0..3670f284b 100644 --- a/contents/home-page/home.yml +++ b/contents/home-page/home.yml @@ -138,10 +138,10 @@ support: cards: - title: Domande frequenti description: Scopri i dettagli dell’iniziativa e le informazioni chiave sulle opportunità del PNRR - isModal: false + link: /supporto/faq - title: Contatti description: Compila il modulo per inviarci i tuoi suggerimenti o per avere chiarimenti sull’iniziativa - isModal: true + link: /supporto/ricevi-aggiornamenti heroMain: category: 'le misure del pnrr' title: Il punto di accesso alle risorse per la transizione digitale della PA diff --git a/src/layouts/IndexPage.jsx b/src/layouts/IndexPage.jsx index 215fc9add..949217fe2 100644 --- a/src/layouts/IndexPage.jsx +++ b/src/layouts/IndexPage.jsx @@ -1,4 +1,4 @@ -import React, { useContext, useEffect } from 'react'; +import React, { useEffect } from 'react'; import { createUseStyles } from 'react-jss'; import { announce } from '@react-aria/live-announcer'; import { @@ -20,7 +20,6 @@ import { HomeCarousel } from '../components/carousel/HomeCarousel'; import { SEO } from '../components/SEO'; import seo from '../../contents/seo.yml'; import labels from '../../contents/labels.yml'; -import { GlobalStateContext } from '../context/globalContext'; import { SupportSection } from './faq/SupportSection'; import { OpportunitySection } from './home/OpportunitySection'; @@ -47,7 +46,6 @@ const useStyles = createUseStyles({ export const IndexPage = () => { const classes = useStyles(); - const [, dispatch] = useContext(GlobalStateContext); useEffect(() => { announce('Pagina caricata ' + name); @@ -101,16 +99,7 @@ export const IndexPage = () => { titleId="home-italia-digitale" /> - { - dispatch({ - type: 'SET:TOGGLE_MODAL_MESSAGE', - }); - }} - /> + ); }; diff --git a/src/layouts/faq/SupportSection.jsx b/src/layouts/faq/SupportSection.jsx index 17034d61e..97cd96efc 100644 --- a/src/layouts/faq/SupportSection.jsx +++ b/src/layouts/faq/SupportSection.jsx @@ -109,7 +109,7 @@ const useStyles = createUseStyles({ export const SupportSection = (props) => { const classes = useStyles(); - const { title, supportList, buttonLabel, handleToggle } = props; + const { title, supportList, buttonLabel } = props; return ( <>
@@ -128,25 +128,8 @@ export const SupportSection = (props) => { {supportList.map((card) => ( - {card.isModal ? ( -
- - - - {card.title} - - {card.description} - - -
- ) : ( - + { + @@ -156,7 +139,7 @@ export const SupportSection = (props) => { - )} + } ))}
@@ -185,5 +168,4 @@ SupportSection.propTypes = { title: PropTypes.string, supportList: PropTypes.array, buttonLabel: PropTypes.string, - handleToggle: PropTypes.func, }; diff --git a/src/layouts/support/Assistance.jsx b/src/layouts/support/Assistance.jsx index 0221709f4..c4167fa16 100644 --- a/src/layouts/support/Assistance.jsx +++ b/src/layouts/support/Assistance.jsx @@ -1,14 +1,13 @@ /* eslint-disable prettier/prettier */ -import React, { useContext } from 'react'; +import React from 'react'; import { createUseStyles } from 'react-jss'; -import { Button } from 'design-react-kit'; +import { Link } from 'gatsby'; import { HeroTitle } from '../../components/hero/HeroTitle'; import { HeroBody } from '../../components/hero/HeroBody'; import { HeroCtaContainer } from '../../components/hero/HeroCtaContainer'; import { HeroGraphic } from '../../components/hero/HeroGraphic'; import { Hero } from '../../components/hero/Hero'; import content from '../../../contents/support-page/support.yml'; -import { GlobalStateContext } from '../../context/globalContext'; const { heroAssistance: { title, body, btnText }, @@ -37,7 +36,6 @@ const useStyle = createUseStyles({ export const Assistance = () => { const classes = useStyle(); - const [, dispatch] = useContext(GlobalStateContext); return ( @@ -47,15 +45,9 @@ export const Assistance = () => { - + diff --git a/src/pages/updates.jsx b/src/pages/supporto/ricevi-aggiornamenti.jsx similarity index 66% rename from src/pages/updates.jsx rename to src/pages/supporto/ricevi-aggiornamenti.jsx index 7d5050fd2..35f736664 100644 --- a/src/pages/updates.jsx +++ b/src/pages/supporto/ricevi-aggiornamenti.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { UpdatesPage } from '../layouts/UpdatesPage'; +import { UpdatesPage } from '../../layouts/UpdatesPage'; const Page = () => ; export default Page;