diff --git a/commons/graphql/queries.ts b/commons/graphql/queries.ts new file mode 100644 index 0000000..e7d16bd --- /dev/null +++ b/commons/graphql/queries.ts @@ -0,0 +1,12 @@ +import gql from "graphql-tag"; + +export const ARTICLE_FOR_HOME = gql` + query ArticlesForHome { + articles { + id + title + content + publishedAt + } + } +`; diff --git a/pages/_app.module.css b/pages/_app.module.css index 923095b..becf2af 100644 --- a/pages/_app.module.css +++ b/pages/_app.module.css @@ -2,5 +2,15 @@ @apply flex; } .sidebar { - @apply md:w-64 w-32; + @apply md:w-64 w-32 flex-none; +} +.primary { + @apply flex-auto; + @apply bg-gray-100 text-gray-700; + .wrapper { + @apply mx-auto max-w-screen-xl; + } +} +.pageHeader { + @apply p-3 bg-gray-50 flex justify-between; } \ No newline at end of file diff --git a/pages/_app.tsx b/pages/_app.tsx index f2be730..ba8613f 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -1,16 +1,43 @@ -import '../styles/globals.css' +import "../styles/globals.css"; import "tailwindcss/tailwind.css"; -import React from 'react'; -import { GlobalSidebar } from '../components/layouts/global-sidebar'; -import styles from './_app.module.css'; +import React from "react"; +import { GlobalSidebar } from "../components/layouts/global-sidebar"; +import styles from "./_app.module.css"; +import { ApolloProvider } from "@apollo/client"; +import { client } from "../commons/graphql/client"; function MyApp({ Component, pageProps }) { return ( -
{article.content}
+