Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
68d6a124d0 |
@@ -31,8 +31,8 @@ To learn more about Next.js, take a look at the following resources:
|
||||
|
||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
|
||||
|
||||
## Deploy on Vercel
|
||||
## Deploy on Hanzo
|
||||
|
||||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
||||
[](https://hanzo.app/new?template=https://github.com/hanzoai/gallery)
|
||||
|
||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
|
||||
One click provisions this app on Hanzo Cloud; every template in the gallery carries the same badge on its page.
|
||||
|
||||
@@ -19,6 +19,10 @@ export function TemplatePageClient({ variants, prevTemplate, nextTemplate, curre
|
||||
const router = useRouter();
|
||||
const [selectedVariant, setSelectedVariant] = useState<Template>(variants[0]);
|
||||
|
||||
// Canonical repo URL for the selected variant (single source of truth).
|
||||
const repoUrl = `https://github.com/hanzo-apps/template-${selectedVariant.slug}`;
|
||||
const deployUrl = `https://hanzo.app/new?template=${encodeURIComponent(repoUrl)}`;
|
||||
|
||||
// Navigate to random template
|
||||
function goToRandomTemplate() {
|
||||
const currentSlug = variants[0].slug;
|
||||
@@ -31,7 +35,6 @@ export function TemplatePageClient({ variants, prevTemplate, nextTemplate, curre
|
||||
|
||||
// Open GitHub repository
|
||||
function openGitHubRepo() {
|
||||
const repoUrl = `https://github.com/hanzo-apps/template-${selectedVariant.slug}`;
|
||||
window.open(repoUrl, '_blank');
|
||||
}
|
||||
|
||||
@@ -113,6 +116,16 @@ export function TemplatePageClient({ variants, prevTemplate, nextTemplate, curre
|
||||
>
|
||||
🚀 Deploy
|
||||
</button>
|
||||
<a
|
||||
href={deployUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
title="Deploy on Hanzo"
|
||||
className="inline-flex items-center whitespace-nowrap"
|
||||
>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img src="https://hanzo.app/deploy-badge.svg" alt="Deploy on Hanzo" className="h-9" />
|
||||
</a>
|
||||
<button
|
||||
onClick={() => {
|
||||
navigator.clipboard.writeText(selectedVariant.path);
|
||||
|
||||
Reference in New Issue
Block a user