chore: prettier erabiltzen du
This commit is contained in:
@@ -1,39 +1,39 @@
|
||||
require("dotenv").config({
|
||||
path: `.env`,
|
||||
})
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
"gatsby-plugin-react-helmet",
|
||||
{
|
||||
resolve: `gatsby-source-filesystem`,
|
||||
options: {
|
||||
name: `images`,
|
||||
path: `${__dirname}/src/images`,
|
||||
},
|
||||
require('dotenv').config({
|
||||
path: `.env`,
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
'gatsby-plugin-react-helmet',
|
||||
{
|
||||
resolve: `gatsby-source-filesystem`,
|
||||
options: {
|
||||
name: `images`,
|
||||
path: `${__dirname}/src/images`,
|
||||
},
|
||||
{
|
||||
resolve: "gatsby-source-strapi",
|
||||
options: {
|
||||
apiURL: process.env.API_URL || "http://localhost:1337/api",
|
||||
singleTypes: ["hasiera"],
|
||||
queryLimit: 1000,
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: 'gatsby-source-strapi',
|
||||
options: {
|
||||
apiURL: process.env.API_URL || 'http://localhost:1337/api',
|
||||
singleTypes: ['hasiera'],
|
||||
queryLimit: 1000,
|
||||
},
|
||||
"gatsby-transformer-sharp",
|
||||
"gatsby-plugin-sharp",
|
||||
{
|
||||
resolve: `gatsby-plugin-manifest`,
|
||||
options: {
|
||||
name: "gatsby-starter-default",
|
||||
short_name: "starter",
|
||||
start_url: "/",
|
||||
background_color: `#663399`,
|
||||
theme_color: `#663399`,
|
||||
display: `minimal-ui`,
|
||||
icon: `src/images/favicon.png`,
|
||||
},
|
||||
},
|
||||
'gatsby-transformer-sharp',
|
||||
'gatsby-plugin-sharp',
|
||||
{
|
||||
resolve: `gatsby-plugin-manifest`,
|
||||
options: {
|
||||
name: 'gatsby-starter-default',
|
||||
short_name: 'starter',
|
||||
start_url: '/',
|
||||
background_color: `#663399`,
|
||||
theme_color: `#663399`,
|
||||
display: `minimal-ui`,
|
||||
icon: `src/images/favicon.png`,
|
||||
},
|
||||
"gatsby-plugin-sitemap"
|
||||
],
|
||||
}
|
||||
},
|
||||
'gatsby-plugin-sitemap',
|
||||
],
|
||||
};
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
import React from "react"
|
||||
import { Link } from "gatsby"
|
||||
import React from 'react';
|
||||
import { Link } from 'gatsby';
|
||||
|
||||
const NotFoundPage: React.VFC = () => {
|
||||
return (
|
||||
<main>
|
||||
|
||||
<h1 >Ez dugu orria topatu</h1>
|
||||
|
||||
<br />
|
||||
<Link to="/">Go home</Link>.
|
||||
<h1>Ez dugu orria topatu</h1>
|
||||
<br />
|
||||
<Link to="/">Go home</Link>.
|
||||
</main>
|
||||
)
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
export default NotFoundPage
|
||||
export default NotFoundPage;
|
||||
|
||||
@@ -1,34 +1,37 @@
|
||||
import { graphql, PageProps, useStaticQuery } from "gatsby"
|
||||
import React from "react"
|
||||
import { graphql, PageProps, useStaticQuery } from 'gatsby';
|
||||
import React from 'react';
|
||||
|
||||
interface DataProps {
|
||||
strapiHasiera: {
|
||||
data: {
|
||||
attributes: {
|
||||
deskribapena: string
|
||||
izenburua: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
deskribapena: string;
|
||||
izenburua: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
const IndexPage: React.VFC<PageProps<DataProps>> = () => {
|
||||
const {strapiHasiera} = useStaticQuery<DataProps>(graphql`
|
||||
{
|
||||
strapiHasiera {
|
||||
data {
|
||||
attributes {
|
||||
deskribapena
|
||||
izenburua
|
||||
const { strapiHasiera } = useStaticQuery<DataProps>(graphql`
|
||||
{
|
||||
strapiHasiera {
|
||||
data {
|
||||
attributes {
|
||||
deskribapena
|
||||
izenburua
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`)
|
||||
return (
|
||||
<main><h1>{strapiHasiera.data.attributes.izenburua}</h1><p>{strapiHasiera.data.attributes.deskribapena}</p></main>
|
||||
)
|
||||
}
|
||||
`);
|
||||
|
||||
export default IndexPage
|
||||
return (
|
||||
<main>
|
||||
<h1>{strapiHasiera.data.attributes.izenburua}</h1>
|
||||
<p>{strapiHasiera.data.attributes.deskribapena}</p>
|
||||
</main>
|
||||
);
|
||||
};
|
||||
|
||||
export default IndexPage;
|
||||
|
||||
Reference in New Issue
Block a user