Karpetak ordenatzen ditu (#15)
* refactor: extract hooks * refactor: naming * refactor: naming * refactor: domain karpeta atontzen du * fix: og image konpontzen du * refactor: move component * refactor: move component * refactor: move component * refactor: move component
This commit is contained in:
26
front/src/pages/PribatutasunPolitika.tsx
Normal file
26
front/src/pages/PribatutasunPolitika.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import React from 'react';
|
||||
|
||||
import { graphql, PageProps, useStaticQuery } from 'gatsby';
|
||||
|
||||
import { SEO } from '../components/SEO';
|
||||
import { RegularPage } from '../views/RegularPage/RegularPage';
|
||||
import { DataProps } from './pribatutasun-politika';
|
||||
|
||||
export const PribatutasunPolitika: React.FC<PageProps> = ({ location }) => {
|
||||
const { strapiPribatutasunPolitika } = useStaticQuery<DataProps>(graphql`
|
||||
{
|
||||
strapiPribatutasunPolitika {
|
||||
izenburua
|
||||
edukia
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
return (
|
||||
<>
|
||||
<SEO title={strapiPribatutasunPolitika.izenburua} location={location} />
|
||||
|
||||
<RegularPage content={strapiPribatutasunPolitika} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -1,35 +1,23 @@
|
||||
import React from 'react';
|
||||
|
||||
import { graphql, PageProps, useStaticQuery } from 'gatsby';
|
||||
import { PageProps } from 'gatsby';
|
||||
|
||||
import { SEO } from '../components/SEO';
|
||||
import { useHasieraContent } from '../domain/hasiera/hooks/useHasieraContent';
|
||||
import { Hasiera } from '../views/Hasiera/Hasiera';
|
||||
import { HasieraContent } from '../views/Hasiera/HasieraContent';
|
||||
|
||||
interface DataProps {
|
||||
strapiHasiera: HasieraContent;
|
||||
}
|
||||
|
||||
const IndexPage: React.FC<PageProps> = ({ location }) => {
|
||||
const { strapiHasiera } = useStaticQuery<DataProps>(graphql`
|
||||
{
|
||||
strapiHasiera {
|
||||
deskribapena
|
||||
izenburua
|
||||
edukia
|
||||
}
|
||||
}
|
||||
`);
|
||||
const content = useHasieraContent();
|
||||
|
||||
return (
|
||||
<>
|
||||
<SEO
|
||||
title={strapiHasiera.izenburua}
|
||||
description={strapiHasiera.deskribapena}
|
||||
title={content.izenburua}
|
||||
description={content.deskribapena}
|
||||
location={location}
|
||||
/>
|
||||
|
||||
<Hasiera content={strapiHasiera} />
|
||||
<Hasiera content={content} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -3,11 +3,11 @@ import React from 'react';
|
||||
import { PageProps } from 'gatsby';
|
||||
|
||||
import { SEO } from '../components/SEO';
|
||||
import { useKafetegiaData } from '../viewQueries/useKafetegiaData';
|
||||
import { useKafetegiaContent } from '../domain/kafetegia/hooks/useKafetegiaContent';
|
||||
import { Kafetegia } from '../views/Kafetegia';
|
||||
|
||||
const KafetegiaPage: React.FC<PageProps> = ({ location }) => {
|
||||
const content = useKafetegiaData();
|
||||
const content = useKafetegiaContent();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,30 +1,19 @@
|
||||
import React from 'react';
|
||||
|
||||
import { graphql, PageProps, useStaticQuery } from 'gatsby';
|
||||
import { PageProps } from 'gatsby';
|
||||
|
||||
import { SEO } from '../components/SEO';
|
||||
import { useLegeOharraContent } from '../domain/basicPage/hooks/useLegeOharraContent';
|
||||
import { RegularPage } from '../views/RegularPage';
|
||||
import { RegularPageContent } from '../views/RegularPage/RegularPageContent';
|
||||
|
||||
interface DataProps {
|
||||
strapiLegeOharra: RegularPageContent;
|
||||
}
|
||||
|
||||
const LegeOharra: React.FC<PageProps> = ({ location }) => {
|
||||
const { strapiLegeOharra } = useStaticQuery<DataProps>(graphql`
|
||||
{
|
||||
strapiLegeOharra {
|
||||
izenburua
|
||||
edukia
|
||||
}
|
||||
}
|
||||
`);
|
||||
const content = useLegeOharraContent();
|
||||
|
||||
return (
|
||||
<>
|
||||
<SEO title={strapiLegeOharra.izenburua} location={location} />
|
||||
<SEO title={content.izenburua} location={location} />
|
||||
|
||||
<RegularPage content={strapiLegeOharra} />
|
||||
<RegularPage content={content} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,30 +1,19 @@
|
||||
import React from 'react';
|
||||
|
||||
import { graphql, PageProps, useStaticQuery } from 'gatsby';
|
||||
import { PageProps } from 'gatsby';
|
||||
|
||||
import { SEO } from '../components/SEO';
|
||||
import { usePribatutasunPolitikaContent } from '../domain/basicPage/hooks/usePribatutasunPolitikaContent';
|
||||
import { RegularPage } from '../views/RegularPage/RegularPage';
|
||||
import { RegularPageContent } from '../views/RegularPage/RegularPageContent';
|
||||
|
||||
interface DataProps {
|
||||
strapiPribatutasunPolitika: RegularPageContent;
|
||||
}
|
||||
|
||||
const PribatutasunPolitika: React.FC<PageProps> = ({ location }) => {
|
||||
const { strapiPribatutasunPolitika } = useStaticQuery<DataProps>(graphql`
|
||||
{
|
||||
strapiPribatutasunPolitika {
|
||||
izenburua
|
||||
edukia
|
||||
}
|
||||
}
|
||||
`);
|
||||
const content = usePribatutasunPolitikaContent();
|
||||
|
||||
return (
|
||||
<>
|
||||
<SEO title={strapiPribatutasunPolitika.izenburua} location={location} />
|
||||
<SEO title={content.izenburua} location={location} />
|
||||
|
||||
<RegularPage content={strapiPribatutasunPolitika} />
|
||||
<RegularPage content={content} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user