Spaces:
Running
Running
remove /projects route
Browse files- app/(public)/page.tsx +3 -191
- app/(public)/projects/page.tsx +0 -9
- app/{projects/[namespace] → [namespace]}/[repoId]/page.tsx +0 -0
- app/{projects/new → new}/page.tsx +0 -0
- components/editor/ask-ai/fake-ask.tsx +1 -1
- components/my-projects/index.tsx +1 -1
- components/my-projects/project-card.tsx +1 -1
- components/not-logged/not-logged.tsx +1 -1
- components/public/navigation/index.tsx +1 -1
- components/user-menu/index.tsx +2 -4
- hooks/useAi.ts +2 -2
- hooks/useEditor.ts +1 -1
- hooks/useUser.ts +1 -1
app/(public)/page.tsx
CHANGED
|
@@ -1,193 +1,5 @@
|
|
| 1 |
-
|
| 2 |
-
import { redirect } from "next/navigation";
|
| 3 |
-
import { AnimatedText } from "@/components/animated-text";
|
| 4 |
-
import { AnimatedBlobs } from "@/components/animated-blobs";
|
| 5 |
|
| 6 |
-
export default function
|
| 7 |
-
|
| 8 |
-
return (
|
| 9 |
-
<div className="">
|
| 10 |
-
<header className="container mx-auto pt-20 px-6 relative flex flex-col items-center justify-center text-center">
|
| 11 |
-
<div className="rounded-full border border-sky-100/10 bg-gradient-to-r from-sky-500/15 to-sky-sky-500/5 text-sm text-sky-300 px-3 py-1 max-w-max mx-auto mb-2">
|
| 12 |
-
✨ DeepSite v3 is out!
|
| 13 |
-
</div>
|
| 14 |
-
<h1 className="text-6xl lg:text-8xl font-semibold text-white font-mono max-w-4xl">
|
| 15 |
-
Code your website with AI in seconds
|
| 16 |
-
</h1>
|
| 17 |
-
<AnimatedText className="text-xl lg:text-2xl text-neutral-300/80 mt-4 text-center max-w-2xl" />
|
| 18 |
-
<div className="mt-14 max-w-2xl w-full mx-auto">{/* <AskAi /> */}</div>
|
| 19 |
-
<AnimatedBlobs />
|
| 20 |
-
</header>
|
| 21 |
-
|
| 22 |
-
<div id="features" className="min-h-screen py-20 px-6 relative">
|
| 23 |
-
<div className="container mx-auto"></div>
|
| 24 |
-
<div className="text-center mb-16">
|
| 25 |
-
<div className="rounded-full border border-neutral-100/10 bg-neutral-100/5 text-sm text-neutral-300 px-3 py-1 max-w-max mx-auto mb-4">
|
| 26 |
-
🚀 Powerful Features
|
| 27 |
-
</div>
|
| 28 |
-
<h2 className="text-4xl lg:text-6xl font-extrabold text-white font-mono mb-4">
|
| 29 |
-
Everything you need
|
| 30 |
-
</h2>
|
| 31 |
-
<p className="text-lg lg:text-xl text-neutral-300/80 max-w-2xl mx-auto">
|
| 32 |
-
Build, deploy, and scale your websites with cutting-edge features
|
| 33 |
-
</p>
|
| 34 |
-
</div>
|
| 35 |
-
|
| 36 |
-
{/* Bento Grid */}
|
| 37 |
-
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-7xl mx-auto">
|
| 38 |
-
{/* Multi Pages */}
|
| 39 |
-
<div
|
| 40 |
-
className="lg:row-span-2 relative p-8 rounded-2xl border border-neutral-100/10 bg-neutral-900/50 backdrop-blur-sm overflow-hidden group hover:border-neutral-100/20 transition-all duration-500 hover:scale-105 hover:rotate-1 hover:-translate-y-2 hover:shadow-2xl hover:shadow-purple-500/20"
|
| 41 |
-
style={{ transformStyle: "preserve-3d" }}
|
| 42 |
-
>
|
| 43 |
-
<div className="relative z-10">
|
| 44 |
-
<div className="text-3xl lg:text-4xl mb-4">📄</div>
|
| 45 |
-
<h3 className="text-2xl lg:text-3xl font-bold text-white font-mono mb-3">
|
| 46 |
-
Multi Pages
|
| 47 |
-
</h3>
|
| 48 |
-
<p className="text-neutral-300/80 lg:text-lg mb-6">
|
| 49 |
-
Create complex websites with multiple interconnected pages.
|
| 50 |
-
Build everything from simple landing pages to full-featured web
|
| 51 |
-
applications with dynamic routing and navigation.
|
| 52 |
-
</p>
|
| 53 |
-
<div className="flex flex-wrap gap-2">
|
| 54 |
-
<span className="px-3 py-1 bg-purple-500/20 text-purple-300 rounded-full text-sm">
|
| 55 |
-
Dynamic Routing
|
| 56 |
-
</span>
|
| 57 |
-
<span className="px-3 py-1 bg-blue-500/20 text-blue-300 rounded-full text-sm">
|
| 58 |
-
Navigation
|
| 59 |
-
</span>
|
| 60 |
-
<span className="px-3 py-1 bg-green-500/20 text-green-300 rounded-full text-sm">
|
| 61 |
-
SEO Ready
|
| 62 |
-
</span>
|
| 63 |
-
</div>
|
| 64 |
-
</div>
|
| 65 |
-
<div className="absolute -top-20 -right-20 w-40 h-40 bg-gradient-to-r from-purple-500 to-pink-500 opacity-20 blur-3xl rounded-full transition-all duration-700 ease-out group-hover:scale-[4] group-hover:opacity-30" />
|
| 66 |
-
</div>
|
| 67 |
-
|
| 68 |
-
{/* Auto Deploy */}
|
| 69 |
-
<div
|
| 70 |
-
className="relative p-6 rounded-2xl border border-neutral-100/10 bg-neutral-900/50 backdrop-blur-sm overflow-hidden group hover:border-neutral-100/20 transition-all duration-500 hover:scale-110 hover:-translate-y-4 hover:-rotate-3 hover:shadow-2xl hover:shadow-yellow-500/25"
|
| 71 |
-
style={{ perspective: "1000px", transformStyle: "preserve-3d" }}
|
| 72 |
-
>
|
| 73 |
-
<div className="relative z-10">
|
| 74 |
-
<div className="text-3xl mb-4">⚡</div>
|
| 75 |
-
<h3 className="text-2xl font-bold text-white font-mono mb-3">
|
| 76 |
-
Auto Deploy
|
| 77 |
-
</h3>
|
| 78 |
-
<p className="text-neutral-300/80 mb-4">
|
| 79 |
-
Push your changes and watch them go live instantly. No complex
|
| 80 |
-
CI/CD setup required.
|
| 81 |
-
</p>
|
| 82 |
-
</div>
|
| 83 |
-
<div className="absolute -bottom-10 -right-10 w-32 h-32 bg-gradient-to-r from-yellow-500 to-orange-500 opacity-20 blur-2xl rounded-full transition-all duration-700 ease-out group-hover:scale-[5] group-hover:opacity-35" />
|
| 84 |
-
</div>
|
| 85 |
-
|
| 86 |
-
{/* Free Hosting */}
|
| 87 |
-
<div className="relative p-6 rounded-2xl border border-neutral-100/10 bg-neutral-900/50 backdrop-blur-sm overflow-hidden group hover:border-neutral-100/20 transition-all duration-500 hover:scale-105 hover:rotate-2 hover:-translate-y-3 hover:shadow-xl hover:shadow-green-500/20">
|
| 88 |
-
<div className="relative z-10">
|
| 89 |
-
<div className="text-3xl mb-4">🌐</div>
|
| 90 |
-
<h3 className="text-2xl font-bold text-white font-mono mb-3">
|
| 91 |
-
Free Hosting
|
| 92 |
-
</h3>
|
| 93 |
-
<p className="text-neutral-300/80 mb-4">
|
| 94 |
-
Host your websites for free with global CDN and lightning-fast
|
| 95 |
-
performance.
|
| 96 |
-
</p>
|
| 97 |
-
</div>
|
| 98 |
-
<div className="absolute -top-10 -left-10 w-32 h-32 bg-gradient-to-r from-green-500 to-emerald-500 opacity-20 blur-2xl rounded-full transition-all duration-700 ease-out group-hover:scale-[5] group-hover:opacity-35" />
|
| 99 |
-
</div>
|
| 100 |
-
|
| 101 |
-
{/* Open Source Models */}
|
| 102 |
-
<div
|
| 103 |
-
className="lg:col-span-2 md:col-span-2 relative p-6 rounded-2xl border border-neutral-100/10 bg-neutral-900/50 backdrop-blur-sm overflow-hidden group hover:border-neutral-100/20 transition-all duration-600 hover:scale-[1.02] hover:rotate-y-6 hover:-translate-y-1 hover:shadow-2xl hover:shadow-cyan-500/20"
|
| 104 |
-
style={{ perspective: "1200px", transformStyle: "preserve-3d" }}
|
| 105 |
-
>
|
| 106 |
-
<div className="relative z-10">
|
| 107 |
-
<div className="text-3xl mb-4">🔓</div>
|
| 108 |
-
<h3 className="text-2xl font-bold text-white font-mono mb-3">
|
| 109 |
-
Open Source Models
|
| 110 |
-
</h3>
|
| 111 |
-
<p className="text-neutral-300/80 mb-4">
|
| 112 |
-
Powered by cutting-edge open source AI models. Transparent,
|
| 113 |
-
customizable, and community-driven development.
|
| 114 |
-
</p>
|
| 115 |
-
<div className="flex flex-wrap gap-2">
|
| 116 |
-
<span className="px-3 py-1 bg-cyan-500/20 text-cyan-300 rounded-full text-sm">
|
| 117 |
-
Llama
|
| 118 |
-
</span>
|
| 119 |
-
<span className="px-3 py-1 bg-indigo-500/20 text-indigo-300 rounded-full text-sm">
|
| 120 |
-
Mistral
|
| 121 |
-
</span>
|
| 122 |
-
<span className="px-3 py-1 bg-pink-500/20 text-pink-300 rounded-full text-sm">
|
| 123 |
-
CodeLlama
|
| 124 |
-
</span>
|
| 125 |
-
</div>
|
| 126 |
-
</div>
|
| 127 |
-
<div className="absolute -bottom-10 right-10 w-32 h-32 bg-gradient-to-r from-cyan-500 to-indigo-500 opacity-20 blur-2xl rounded-full transition-all duration-700 ease-out group-hover:scale-[5] group-hover:opacity-35" />
|
| 128 |
-
</div>
|
| 129 |
-
|
| 130 |
-
{/* UX Focus */}
|
| 131 |
-
<div
|
| 132 |
-
className="relative p-6 rounded-2xl border border-neutral-100/10 bg-neutral-900/50 backdrop-blur-sm overflow-hidden group hover:border-neutral-100/20 transition-all duration-500 hover:scale-110 hover:rotate-3 hover:-translate-y-2 hover:rotate-x-6 hover:shadow-xl hover:shadow-rose-500/25"
|
| 133 |
-
style={{ transformStyle: "preserve-3d" }}
|
| 134 |
-
>
|
| 135 |
-
<div className="relative z-10">
|
| 136 |
-
<div className="text-3xl mb-4">✨</div>
|
| 137 |
-
<h3 className="text-2xl font-bold text-white font-mono mb-3">
|
| 138 |
-
Perfect UX
|
| 139 |
-
</h3>
|
| 140 |
-
<p className="text-neutral-300/80 mb-4">
|
| 141 |
-
Intuitive interface designed for developers and non-developers
|
| 142 |
-
alike.
|
| 143 |
-
</p>
|
| 144 |
-
</div>
|
| 145 |
-
<div className="absolute -top-10 -right-10 w-32 h-32 bg-gradient-to-r from-rose-500 to-pink-500 opacity-20 blur-2xl rounded-full transition-all duration-700 ease-out group-hover:scale-[5] group-hover:opacity-35" />
|
| 146 |
-
</div>
|
| 147 |
-
|
| 148 |
-
{/* Hugging Face Integration */}
|
| 149 |
-
<div
|
| 150 |
-
className="relative p-6 rounded-2xl border border-neutral-100/10 bg-neutral-900/50 backdrop-blur-sm overflow-hidden group hover:border-neutral-100/20 transition-all duration-500 hover:scale-[1.08] hover:-rotate-2 hover:-translate-y-3 hover:rotate-y-8 hover:shadow-xl hover:shadow-amber-500/20"
|
| 151 |
-
style={{ perspective: "800px" }}
|
| 152 |
-
>
|
| 153 |
-
<div className="relative z-10">
|
| 154 |
-
<div className="text-3xl mb-4">🤗</div>
|
| 155 |
-
<h3 className="text-2xl font-bold text-white font-mono mb-3">
|
| 156 |
-
Hugging Face
|
| 157 |
-
</h3>
|
| 158 |
-
<p className="text-neutral-300/80 mb-4">
|
| 159 |
-
Seamless integration with Hugging Face models and datasets for
|
| 160 |
-
cutting-edge AI capabilities.
|
| 161 |
-
</p>
|
| 162 |
-
</div>
|
| 163 |
-
<div className="absolute -top-10 -right-10 w-32 h-32 bg-gradient-to-r from-yellow-500 to-amber-500 opacity-20 blur-2xl rounded-full transition-all duration-700 ease-out group-hover:scale-[5] group-hover:opacity-35" />
|
| 164 |
-
</div>
|
| 165 |
-
|
| 166 |
-
{/* Performance */}
|
| 167 |
-
<div
|
| 168 |
-
className="relative p-6 rounded-2xl border border-neutral-100/10 bg-neutral-900/50 backdrop-blur-sm overflow-hidden group hover:border-neutral-100/20 transition-all duration-500 hover:scale-105 hover:rotate-1 hover:-translate-y-4 hover:rotate-x-8 hover:shadow-2xl hover:shadow-blue-500/25"
|
| 169 |
-
style={{ transformStyle: "preserve-3d" }}
|
| 170 |
-
>
|
| 171 |
-
<div className="relative z-10">
|
| 172 |
-
<div className="text-3xl mb-4">🚀</div>
|
| 173 |
-
<h3 className="text-2xl font-bold text-white font-mono mb-3">
|
| 174 |
-
Blazing Fast
|
| 175 |
-
</h3>
|
| 176 |
-
<p className="text-neutral-300/80 mb-4">
|
| 177 |
-
Optimized performance with edge computing and smart caching.
|
| 178 |
-
</p>
|
| 179 |
-
</div>
|
| 180 |
-
<div className="absolute -bottom-10 -right-10 w-32 h-32 bg-gradient-to-r from-blue-500 to-cyan-500 opacity-20 blur-2xl rounded-full transition-all duration-700 ease-out group-hover:scale-[5] group-hover:opacity-35" />
|
| 181 |
-
</div>
|
| 182 |
-
</div>
|
| 183 |
-
</div>
|
| 184 |
-
|
| 185 |
-
{/* Background Effects */}
|
| 186 |
-
<div className="absolute inset-0 pointer-events-none -z-[1]">
|
| 187 |
-
<div className="w-1/3 h-1/3 bg-gradient-to-r from-purple-500 to-pink-500 opacity-5 blur-3xl absolute top-20 left-10 rounded-full" />
|
| 188 |
-
<div className="w-1/4 h-1/4 bg-gradient-to-r from-blue-500 to-teal-500 opacity-10 blur-3xl absolute bottom-20 right-20 rounded-full" />
|
| 189 |
-
<div className="w-1/5 h-1/5 bg-gradient-to-r from-amber-500 to-rose-500 opacity-8 blur-3xl absolute top-1/2 left-1/3 rounded-full" />
|
| 190 |
-
</div>
|
| 191 |
-
</div>
|
| 192 |
-
);
|
| 193 |
}
|
|
|
|
| 1 |
+
import { MyProjects } from "@/components/my-projects";
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
export default async function HomePage() {
|
| 4 |
+
return <MyProjects />;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
}
|
app/(public)/projects/page.tsx
DELETED
|
@@ -1,9 +0,0 @@
|
|
| 1 |
-
import { getProjects } from "@/app/actions/projects";
|
| 2 |
-
import { MyProjects } from "@/components/my-projects";
|
| 3 |
-
import { NotLogged } from "@/components/not-logged/not-logged";
|
| 4 |
-
|
| 5 |
-
export default async function ProjectsPage() {
|
| 6 |
-
// const { ok, projects } = await getProjects();
|
| 7 |
-
|
| 8 |
-
return <MyProjects />;
|
| 9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/{projects/[namespace] → [namespace]}/[repoId]/page.tsx
RENAMED
|
File without changes
|
app/{projects/new → new}/page.tsx
RENAMED
|
File without changes
|
components/editor/ask-ai/fake-ask.tsx
CHANGED
|
@@ -26,7 +26,7 @@ export const FakeAskAi = () => {
|
|
| 26 |
|
| 27 |
const callAi = async () => {
|
| 28 |
setPromptStorage(prompt);
|
| 29 |
-
router.push("/
|
| 30 |
};
|
| 31 |
|
| 32 |
const randomPrompt = () => {
|
|
|
|
| 26 |
|
| 27 |
const callAi = async () => {
|
| 28 |
setPromptStorage(prompt);
|
| 29 |
+
router.push("/new");
|
| 30 |
};
|
| 31 |
|
| 32 |
const randomPrompt = () => {
|
components/my-projects/index.tsx
CHANGED
|
@@ -76,7 +76,7 @@ export function MyProjects() {
|
|
| 76 |
<div className="mt-8 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8">
|
| 77 |
{projects.length < MAX_FREE_PROJECTS || user?.isPro ? (
|
| 78 |
<Link
|
| 79 |
-
href="/
|
| 80 |
className="bg-neutral-900 rounded-xl h-64 lg:h-44 flex items-center justify-center text-neutral-300 border border-neutral-800 hover:brightness-110 transition-all duration-200"
|
| 81 |
>
|
| 82 |
<Plus className="size-5 mr-1.5" />
|
|
|
|
| 76 |
<div className="mt-8 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8">
|
| 77 |
{projects.length < MAX_FREE_PROJECTS || user?.isPro ? (
|
| 78 |
<Link
|
| 79 |
+
href="/new"
|
| 80 |
className="bg-neutral-900 rounded-xl h-64 lg:h-44 flex items-center justify-center text-neutral-300 border border-neutral-800 hover:brightness-110 transition-all duration-200"
|
| 81 |
>
|
| 82 |
<Plus className="size-5 mr-1.5" />
|
components/my-projects/project-card.tsx
CHANGED
|
@@ -49,7 +49,7 @@ export function ProjectCard({
|
|
| 49 |
return (
|
| 50 |
<div className="text-neutral-200 space-y-4 group cursor-pointer">
|
| 51 |
<Link
|
| 52 |
-
href={
|
| 53 |
className="relative bg-neutral-900 rounded-2xl overflow-hidden h-64 lg:h-44 w-full flex items-center justify-end flex-col px-3 border border-neutral-800"
|
| 54 |
>
|
| 55 |
{project.private ? (
|
|
|
|
| 49 |
return (
|
| 50 |
<div className="text-neutral-200 space-y-4 group cursor-pointer">
|
| 51 |
<Link
|
| 52 |
+
href={`/${project.name}`}
|
| 53 |
className="relative bg-neutral-900 rounded-2xl overflow-hidden h-64 lg:h-44 w-full flex items-center justify-end flex-col px-3 border border-neutral-800"
|
| 54 |
>
|
| 55 |
{project.private ? (
|
components/not-logged/not-logged.tsx
CHANGED
|
@@ -10,7 +10,7 @@ export const NotLogged = () => {
|
|
| 10 |
<div className="rounded-full border border-sky-100/10 bg-gradient-to-r from-sky-500/15 to-sky-sky-500/5 text-sm text-sky-300 px-3 py-1 max-w-max mx-auto mb-2">
|
| 11 |
✨ DeepSite v3 is out!
|
| 12 |
</div>
|
| 13 |
-
<h1 className="text-5xl lg:text-
|
| 14 |
Welcome to DeepSite
|
| 15 |
</h1>
|
| 16 |
<p className="text-white/70 text-xl mt-3 mb-8">
|
|
|
|
| 10 |
<div className="rounded-full border border-sky-100/10 bg-gradient-to-r from-sky-500/15 to-sky-sky-500/5 text-sm text-sky-300 px-3 py-1 max-w-max mx-auto mb-2">
|
| 11 |
✨ DeepSite v3 is out!
|
| 12 |
</div>
|
| 13 |
+
<h1 className="text-5xl lg:text-7xl font-semibold text-white font-mono max-w-4xl">
|
| 14 |
Welcome to DeepSite
|
| 15 |
</h1>
|
| 16 |
<p className="text-white/70 text-xl mt-3 mb-8">
|
components/public/navigation/index.tsx
CHANGED
|
@@ -16,7 +16,7 @@ import { ProTag } from "@/components/pro-modal";
|
|
| 16 |
const navigationLinks = [
|
| 17 |
{
|
| 18 |
name: "Create Website",
|
| 19 |
-
href: "/
|
| 20 |
},
|
| 21 |
{
|
| 22 |
name: "Features",
|
|
|
|
| 16 |
const navigationLinks = [
|
| 17 |
{
|
| 18 |
name: "Create Website",
|
| 19 |
+
href: "/new",
|
| 20 |
},
|
| 21 |
{
|
| 22 |
name: "Features",
|
components/user-menu/index.tsx
CHANGED
|
@@ -45,13 +45,11 @@ export const UserMenu = ({ className }: { className?: string }) => {
|
|
| 45 |
</DropdownMenuLabel>
|
| 46 |
<DropdownMenuSeparator />
|
| 47 |
<DropdownMenuGroup>
|
| 48 |
-
<DropdownMenuItem
|
| 49 |
-
onClick={() => (window.location.href = "/projects/new")}
|
| 50 |
-
>
|
| 51 |
<CirclePlus className="size-4 text-neutral-100" />
|
| 52 |
New Project
|
| 53 |
</DropdownMenuItem>
|
| 54 |
-
<Link href="/
|
| 55 |
<DropdownMenuItem>
|
| 56 |
<FolderCode className="size-4 text-neutral-100" />
|
| 57 |
View Projects
|
|
|
|
| 45 |
</DropdownMenuLabel>
|
| 46 |
<DropdownMenuSeparator />
|
| 47 |
<DropdownMenuGroup>
|
| 48 |
+
<DropdownMenuItem onClick={() => (window.location.href = "/new")}>
|
|
|
|
|
|
|
| 49 |
<CirclePlus className="size-4 text-neutral-100" />
|
| 50 |
New Project
|
| 51 |
</DropdownMenuItem>
|
| 52 |
+
<Link href="/">
|
| 53 |
<DropdownMenuItem>
|
| 54 |
<FolderCode className="size-4 text-neutral-100" />
|
| 55 |
View Projects
|
hooks/useAi.ts
CHANGED
|
@@ -124,7 +124,7 @@ export const useAi = (onScrollToBottom?: () => void, livePreviewRef?: React.RefO
|
|
| 124 |
if (livePreviewRef?.current) {
|
| 125 |
livePreviewRef.current.reset();
|
| 126 |
}
|
| 127 |
-
router.replace(
|
| 128 |
setProject(response.data.space);
|
| 129 |
setProjects([...projects, response.data.space]);
|
| 130 |
toast.success("AI responded successfully");
|
|
@@ -315,7 +315,7 @@ export const useAi = (onScrollToBottom?: () => void, livePreviewRef?: React.RefO
|
|
| 315 |
) as HTMLIFrameElement;
|
| 316 |
|
| 317 |
if (isNew && res.repoId) {
|
| 318 |
-
router.push(
|
| 319 |
setIsAiWorking(false);
|
| 320 |
} else {
|
| 321 |
setPages(res.pages);
|
|
|
|
| 124 |
if (livePreviewRef?.current) {
|
| 125 |
livePreviewRef.current.reset();
|
| 126 |
}
|
| 127 |
+
router.replace(`/${response.data.space.project.space_id}`);
|
| 128 |
setProject(response.data.space);
|
| 129 |
setProjects([...projects, response.data.space]);
|
| 130 |
toast.success("AI responded successfully");
|
|
|
|
| 315 |
) as HTMLIFrameElement;
|
| 316 |
|
| 317 |
if (isNew && res.repoId) {
|
| 318 |
+
router.push(`/${res.repoId}`);
|
| 319 |
setIsAiWorking(false);
|
| 320 |
} else {
|
| 321 |
setPages(res.pages);
|
hooks/useEditor.ts
CHANGED
|
@@ -31,7 +31,7 @@ export const useEditor = (namespace?: string, repoId?: string) => {
|
|
| 31 |
return project;
|
| 32 |
} catch (error: any) {
|
| 33 |
toast.error(error.response.data.error);
|
| 34 |
-
router.push("/
|
| 35 |
return null;
|
| 36 |
}
|
| 37 |
},
|
|
|
|
| 31 |
return project;
|
| 32 |
} catch (error: any) {
|
| 33 |
toast.error(error.response.data.error);
|
| 34 |
+
router.push("/");
|
| 35 |
return null;
|
| 36 |
}
|
| 37 |
},
|
hooks/useUser.ts
CHANGED
|
@@ -110,7 +110,7 @@ export const useUser = (initialData?: {
|
|
| 110 |
router.push(currentRoute);
|
| 111 |
removeCurrentRoute();
|
| 112 |
} else {
|
| 113 |
-
router.push("/
|
| 114 |
}
|
| 115 |
toast.success("Login successful");
|
| 116 |
}
|
|
|
|
| 110 |
router.push(currentRoute);
|
| 111 |
removeCurrentRoute();
|
| 112 |
} else {
|
| 113 |
+
router.push("/");
|
| 114 |
}
|
| 115 |
toast.success("Login successful");
|
| 116 |
}
|