Skip to content

Commit

Permalink
remove shadcn feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Nutlope committed Aug 13, 2024
1 parent 0e149cb commit 333a283
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
1 change: 0 additions & 1 deletion app/(main)/actions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use server";

import client from "@/lib/prisma";
import { redirect } from "next/navigation";

export async function shareApp({
generatedCode,
Expand Down
30 changes: 12 additions & 18 deletions app/(main)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ import { toast, Toaster } from "sonner";
import LoadingDots from "../../components/loading-dots";
import { shareApp } from "./actions";

const FEATURES = {
shadcn: false,
};

export default function Home() {
let [status, setStatus] = useState<
"initial" | "creating" | "created" | "updating" | "updated"
Expand Down Expand Up @@ -295,20 +291,18 @@ export default function Home() {
</Select.Root>
</div>

{FEATURES.shadcn && (
<div className="flex h-full items-center justify-between gap-3 sm:justify-center">
<label className="text-gray-500 sm:text-xs" htmlFor="shadcn">
shadcn/ui:
</label>
<Switch.Root
className="group flex w-20 max-w-xs items-center rounded-2xl border-[6px] border-gray-300 bg-white p-1.5 text-sm shadow-inner transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-500 data-[state=checked]:bg-blue-500"
id="shadcn"
name="shadcn"
>
<Switch.Thumb className="size-7 rounded-lg bg-gray-200 shadow-[0_1px_2px] shadow-gray-400 transition data-[state=checked]:translate-x-7 data-[state=checked]:bg-white data-[state=checked]:shadow-gray-600" />
</Switch.Root>
</div>
)}
<div className="flex h-full items-center justify-between gap-3 sm:justify-center">
<label className="text-gray-500 sm:text-xs" htmlFor="shadcn">
shadcn/ui:
</label>
<Switch.Root
className="group flex w-20 max-w-xs items-center rounded-2xl border-[6px] border-gray-300 bg-white p-1.5 text-sm shadow-inner transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-500 data-[state=checked]:bg-blue-500"
id="shadcn"
name="shadcn"
>
<Switch.Thumb className="size-7 rounded-lg bg-gray-200 shadow-[0_1px_2px] shadow-gray-400 transition data-[state=checked]:translate-x-7 data-[state=checked]:bg-white data-[state=checked]:shadow-gray-600" />
</Switch.Root>
</div>
</div>
</fieldset>
</form>
Expand Down

0 comments on commit 333a283

Please sign in to comment.