Skip to content

Commit

Permalink
Merge pull request #24 from replicate/upgrade-next-js
Browse files Browse the repository at this point in the history
Upgrade Next.js
  • Loading branch information
zeke authored Oct 10, 2023
2 parents 375321e + 587f451 commit fb18368
Show file tree
Hide file tree
Showing 7 changed files with 298 additions and 327 deletions.
58 changes: 32 additions & 26 deletions components/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ export default function Footer({ events, startOver, handleImageDropped }) {
return (
<footer className="w-full my-8">
<div className="text-center">
<Link href="/about">
<a className="lil-button">
<InfoIcon className="icon" />
What is this?
</a>
<Link href="/about" className="lil-button">

<InfoIcon className="icon" />What is this?
</Link>

{events.length > 1 && (
Expand All @@ -28,47 +26,55 @@ export default function Footer({ events, startOver, handleImageDropped }) {
<Dropzone onImageDropped={handleImageDropped} />

{events.length > 2 && (
<Link href={events.findLast((ev) => ev.image).image}>
<a className="lil-button" target="_blank" rel="noopener noreferrer">
<DownloadIcon className="icon" />
Download image
</a>
</Link>
(<Link
href={events.findLast((ev) => ev.image).image}
className="lil-button"
target="_blank"
rel="noopener noreferrer">

<DownloadIcon className="icon" />Download image
</Link>)
)}

<Link href="https://github.com/replicate/instruct-pix2pix-demo">
<a className="lil-button" target="_blank" rel="noopener noreferrer">
<CodeIcon className="icon" />
Fork repo
</a>
<Link
href="https://github.com/replicate/instruct-pix2pix-demo"
className="lil-button"
target="_blank"
rel="noopener noreferrer">

<CodeIcon className="icon" />Fork repo
</Link>
</div>

<div className="text-center lil-text mt-8">
<div className="inline-block py-2 px-4 border border-yellow-200 rounded-lg bg-[#fef6aa]">
🤔 Are you a developer and want to learn how to build this? Check out the{" "}
<Link href="https://github.com/replicate/paint-with-words#readme">
<a target="_blank">README</a>
<Link
href="https://github.com/replicate/paint-with-words#readme"
target="_blank">
README
</Link>.
</div>
</div>

<div className="text-center lil-text mt-8">
Powered by{" "}
<Link href="https://www.timothybrooks.com/instruct-pix2pix/">
<a target="_blank">InstructPix2Pix</a>
<Link href="https://www.timothybrooks.com/instruct-pix2pix/" target="_blank">
InstructPix2Pix
</Link>
,{" "}
<Link href="https://replicate.com/timothybrooks/instruct-pix2pix?utm_source=project&utm_campaign=paintbytext">
<a target="_blank">Replicate</a>
<Link
href="https://replicate.com/timothybrooks/instruct-pix2pix?utm_source=project&utm_campaign=paintbytext"
target="_blank">
Replicate
</Link>
,{" "}
<Link href="https://vercel.com/templates/ai">
<a target="_blank">Vercel</a>
<Link href="https://vercel.com/templates/ai" target="_blank">
Vercel
</Link>
, and{" "}
<Link href="https://github.com/replicate/instruct-pix2pix-demo">
<a target="_blank">GitHub</a>
<Link href="https://github.com/replicate/instruct-pix2pix-demo" target="_blank">
GitHub
</Link>
</div>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion components/messages.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { RotateCcw as UndoIcon } from "lucide-react";
import Image from "next/future/image";
import Image from "next/image";
import { Fragment, useEffect, useRef } from "react";
import PulseLoader from "react-spinners/PulseLoader";
import Message from "./message";
Expand Down
26 changes: 17 additions & 9 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,25 @@ const nextConfig = {
reactStrictMode: true,
swcMinify: true,
images: {
domains: [
"replicate.com",
"replicate.delivery",
"user-images.githubusercontent.com",
remotePatterns: [
{
protocol: "https",
hostname: "replicate.com",
},
{
protocol: "https",
hostname: "replicate.delivery",
},
{
protocol: "https",
hostname: "*.replicate.delivery",
},
{
protocol: "https",
hostname: "user-images.githubusercontent.com",
},
],
},
experimental: {
images: {
allowFutureImage: true,
},
},
async redirects() {
return [
{
Expand Down
Loading

1 comment on commit fb18368

@vercel
Copy link

@vercel vercel bot commented on fb18368 Oct 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.