-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
1,067 additions
and
509 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' }) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' }) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' }) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
) | ||
} |
Oops, something went wrong.