Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Luen committed Oct 25, 2024
1 parent fadb403 commit 9e50451
Show file tree
Hide file tree
Showing 10 changed files with 1,067 additions and 509 deletions.
16 changes: 8 additions & 8 deletions app/api/brewprints/route.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { NextResponse } from 'next/server';
import { NextResponse } from 'next/server'
import { getBrewprints } from '@/lib/brewprints'

export const dynamic = 'force-static'
export const dynamicParams = false
export const revalidate = 604800

export async function GET(req, res) {
try {
const brewprints = await getBrewprints();
return NextResponse.json(brewprints);
} catch (error) {
console.error(error);
return NextResponse.json({ message: "Error fetching data" });
}
try {
const brewprints = await getBrewprints()
return NextResponse.json(brewprints)
} catch (error) {
console.error(error)
return NextResponse.json({ message: 'Error fetching data' })
}
}
16 changes: 8 additions & 8 deletions app/api/ingredients/route.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { NextResponse } from 'next/server';
import { NextResponse } from 'next/server'
import { getIngredients } from '@/lib/ingredients'

export const dynamic = 'force-static'
export const revalidate = 604800
export const dynamicParams = false

export async function GET(req, res) {
try {
const products = await getIngredients();
return NextResponse.json(products);
} catch (error) {
console.error(error);
return NextResponse.json({ message: "Error fetching data" });
}
try {
const products = await getIngredients()
return NextResponse.json(products)
} catch (error) {
console.error(error)
return NextResponse.json({ message: 'Error fetching data' })
}
}
16 changes: 8 additions & 8 deletions app/api/recipes/route.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { NextResponse } from 'next/server';
import { NextResponse } from 'next/server'

export const dynamic = 'force-static'
export const revalidate = 604800
export const dynamicParams = false

export async function GET(req, res) {
try {
const recipes = require('@/lib/recipesClones.json');
try {
const recipes = require('@/lib/recipesClones.json')

return NextResponse.json(recipes);
} catch (error) {
console.error(error);
return NextResponse.json({ message: "Error fetching data" });
}
return NextResponse.json(recipes)
} catch (error) {
console.error(error)
return NextResponse.json({ message: 'Error fetching data' })
}
}
14 changes: 7 additions & 7 deletions app/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import './globals.css'
const inter = Inter({ subsets: ['latin'] })

export const metadata = {
title: 'BrewArt Brewprints Brewing Recipes & Ingredients',
description: 'Comparing all the brewprints and recipes for home brewing.',
title: 'BrewArt Brewprints Brewing Recipes & Ingredients',
description: 'Comparing all the brewprints and recipes for home brewing.',
}

export default function RootLayout({ children }) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
</html>
)
return (
<html lang="en">
<body className={inter.className}>{children}</body>
</html>
)
}
73 changes: 49 additions & 24 deletions app/page.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,51 @@
import BrewprintsServer from "@/components/BrewprintsServer"
import Recipes from "@/components/Recipes"
import Ingredients from "@/components/Ingredients"
import BrewprintsServer from '@/components/BrewprintsServer'
import Recipes from '@/components/Recipes'
import Ingredients from '@/components/Ingredients'
import Link from '@/components/Link'

export default function Home() {
return (
<main className="px-6 mx-auto max-w-2xl">
<h1 className="mt-12 mb-12 text-3xl text-center dark:text-white">
BeerArt BeerDroid Brewprints, Ingredients, & Commercial Beer Clones
</h1>
<p className="mb-12 text-base text-center dark:text-white">
This is a fan site for the BrewArt BeerDroid. It is not affiliated with BrewArt. See the <a href="https://github.com/Luen/brewart">GitHub Repo</a>.
The BrewArt BeerDroid is an automated brewing system that allows you to brew beer at home.
This site provides a list of Brewprints, Commercial Clone Recipes, and Ingredients.
</p>
<div className="sticky top-0 bg-black py-2 z-50 text-center">
<a href="#brewprints" className="mx-2 px-4 py-2 bg-gray-300 text-black rounded hover:bg-gray-400 hover:text-white transition duration-300">Brewprints</a>
<a href="#recipes" className="mx-2 px-4 py-2 bg-gray-300 text-black rounded hover:bg-gray-400 hover:text-white transition duration-300">Recipes</a>
<a href="#ingredients" className="mx-2 px-4 py-2 bg-gray-300 text-black rounded hover:bg-gray-400 hover:text-white transition duration-300">Ingredients</a>
</div>
<BrewprintsServer />
<Recipes />
<Ingredients />
</main>
)
}
return (
<main className="px-6 mx-auto max-w-2xl">
<h1 className="mt-12 mb-12 text-3xl text-center dark:text-white">
BeerArt BeerDroid Brewprints, Ingredients, & Commercial Beer
Clones
</h1>
<p className="mb-12 text-base text-center dark:text-white">
This is a fan site for the BrewArt BeerDroid. It is not
affiliated with BrewArt. See the{' '}
<Link
href="https://github.com/Luen/brewart"
className="underline"
>
GitHub Repo
</Link>
. The BrewArt BeerDroid is an automated brewing system that
allows you to brew beer at home. This site provides a list of
Brewprints, Commercial Clone Recipes, and Ingredients.
</p>
<div className="sticky top-0 bg-black py-2 z-50 text-center">
<a
href="#brewprints"
className="mx-2 px-4 py-2 bg-gray-300 text-black rounded hover:bg-gray-400 hover:text-white transition duration-300"
>
Brewprints
</a>
<a
href="#recipes"
className="mx-2 px-4 py-2 bg-gray-300 text-black rounded hover:bg-gray-400 hover:text-white transition duration-300"
>
Recipes
</a>
<a
href="#ingredients"
className="mx-2 px-4 py-2 bg-gray-300 text-black rounded hover:bg-gray-400 hover:text-white transition duration-300"
>
Ingredients
</a>
</div>
<BrewprintsServer />
<Recipes />
<Ingredients />
</main>
)
}
Loading

0 comments on commit 9e50451

Please sign in to comment.