Skip to content
Open
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
25 changes: 9 additions & 16 deletions with-astro/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
export default {
// projectRoot: '.', // Where to resolve all URLs relative to. Useful if you have a monorepo project.
// pages: './src/pages', // Path to Astro components, pages, and data
// dist: './dist', // When running `astro build`, path to final static output
// public: './public', // A folder of static files Astro will copy to the root. Useful for favicons, images, and other files that don’t need processing.
buildOptions: {
// site: 'http://example.com', // Your public domain, e.g.: https://my-site.dev/. Used to generate sitemaps and canonical URLs.
sitemap: true, // Generate sitemap (set to "false" to disable)
},
devOptions: {
// hostname: 'localhost', // The hostname to run the dev server on.
// port: 3000, // The port to run the dev server on.
// tailwindConfig: '', // Path to tailwind.config.js if used, e.g. './tailwind.config.js'
},
renderers: [],
}
import { defineConfig } from "astro/config";
import react from "@astrojs/react";
import tailwind from "@astrojs/tailwind";


// https://astro.build/config
export default defineConfig({
integrations: [tailwind(), react()]
});
15 changes: 13 additions & 2 deletions with-astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,18 @@
"format": "prettier -w ."
},
"devDependencies": {
"astro": "^0.20.12",
"prettier-plugin-astro": "0.0.10"
"@astrojs/tailwind": "^5.1.0",
"autoprefixer": "10.4.13",
"canvas-confetti": "1.6.0"
},
"dependencies": {
"@astrojs/react": "^3.0.10",
"@tailwindcss/typography": "^0.5.9",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
"astro": "^4.4.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwindcss": "^3.4.1"
}
}
1 change: 1 addition & 0 deletions with-astro/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="astro/client" />
8 changes: 4 additions & 4 deletions with-astro/src/layouts/default.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import astroLogo from '../../public/assets/logo.svg'
import astroLogo from '../../public/favicon.svg'
---

<html lang="en">
Expand All @@ -11,9 +11,9 @@ import astroLogo from '../../public/assets/logo.svg'
<link rel="stylesheet" href="/style/global.css" />
</head>
<body>
<main>
<div style="text-align: center;">
<img style="width: 50px;" src={astroLogo} alt="Astro Logo" />
<main class="container max-w-full min-h-screen">
<div style="mx-auto max-w-xl px-4 py-8 text-align: center;">
<img style="width: 50px;" src={astroLogo.src} alt="Astro Logo" />
</div>
<header>
<h1>Hygraph with Astro</h1>
Expand Down
8 changes: 6 additions & 2 deletions with-astro/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"moduleResolution": "node"
}
"extends": "astro/tsconfigs/base",
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "react"
}
}
6 changes: 3 additions & 3 deletions with-nextauth-credentials/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"bcrypt": "5.0.1",
"graphql": "16.1.0",
"graphql-request": "3.7.0",
"next": "12.0.7",
"next": "^14.1.0",
"next-auth": "4.0.2",
"react": "17.0.2",
"react-dom": "17.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "7.21.0",
"react-hot-toast": "2.1.1"
}
Expand Down
18 changes: 12 additions & 6 deletions with-nextjs-app-directory/next.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
appDir: true,
},
};

module.exports = nextConfig;
images: {
dangerouslyAllowSVG: true,
remotePatterns: [
{
protocol: 'https',
hostname: 'media.graphassets.com'
},
]

},
}
module.exports = nextConfig
5 changes: 3 additions & 2 deletions with-nextjs-app-directory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"dependencies": {
"encoding": "^0.1.13",
"graphql-request": "^1.8.2",
"next": "^13.1.6",
"react": "^18.2.0"
"next": "^14.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
}
2 changes: 1 addition & 1 deletion with-nextjs-app-directory/src/app/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function generateMetadata() {

export default async function Page() {
const products = await getProducts();
console.log(products);
//console.log(products);
return (
<div>
<h1>Products</h1>
Expand Down
Loading