mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
add tanstack start
This commit is contained in:
@@ -108,7 +108,8 @@ const StackArchitect = () => {
|
||||
const notes: Record<string, string[]> = {};
|
||||
const hasWebFrontend =
|
||||
stack.frontend.includes("tanstack-router") ||
|
||||
stack.frontend.includes("react-router");
|
||||
stack.frontend.includes("react-router") ||
|
||||
stack.frontend.includes("tanstack-start");
|
||||
|
||||
notes.frontend = [];
|
||||
|
||||
@@ -241,7 +242,11 @@ const StackArchitect = () => {
|
||||
setStack((prev) => {
|
||||
if (category === "frontend") {
|
||||
const currentSelection = [...prev.frontend];
|
||||
const webTypes = ["tanstack-router", "react-router"];
|
||||
const webTypes = [
|
||||
"tanstack-router",
|
||||
"react-router",
|
||||
"tanstack-start",
|
||||
];
|
||||
|
||||
if (techId === "none") {
|
||||
return {
|
||||
@@ -288,7 +293,8 @@ const StackArchitect = () => {
|
||||
const index = currentArray.indexOf(techId);
|
||||
const hasWebFrontend =
|
||||
prev.frontend.includes("tanstack-router") ||
|
||||
prev.frontend.includes("react-router");
|
||||
prev.frontend.includes("react-router") ||
|
||||
prev.frontend.includes("tanstack-start");
|
||||
|
||||
if (index >= 0) {
|
||||
currentArray.splice(index, 1);
|
||||
@@ -312,7 +318,8 @@ const StackArchitect = () => {
|
||||
if (
|
||||
category === "addons" &&
|
||||
(techId === "pwa" || techId === "tauri") &&
|
||||
!hasWebFrontend
|
||||
!prev.frontend.includes("tanstack-router") &&
|
||||
!prev.frontend.includes("react-router")
|
||||
) {
|
||||
return prev;
|
||||
}
|
||||
@@ -437,6 +444,7 @@ const StackArchitect = () => {
|
||||
return (
|
||||
frontendOptions.includes("tanstack-router") ||
|
||||
frontendOptions.includes("react-router") ||
|
||||
frontendOptions.includes("tanstack-start") ||
|
||||
frontendOptions.includes("native")
|
||||
);
|
||||
}, []);
|
||||
@@ -680,6 +688,11 @@ const StackArchitect = () => {
|
||||
}
|
||||
|
||||
const hasWebFrontendSelected =
|
||||
stack.frontend.includes("tanstack-router") ||
|
||||
stack.frontend.includes("react-router") ||
|
||||
stack.frontend.includes("tanstack-start");
|
||||
|
||||
const hasPWACompatibleFrontend =
|
||||
stack.frontend.includes("tanstack-router") ||
|
||||
stack.frontend.includes("react-router");
|
||||
|
||||
@@ -698,7 +711,7 @@ const StackArchitect = () => {
|
||||
stack.backendFramework === "elysia"))) ||
|
||||
(activeTab === "addons" &&
|
||||
(tech.id === "pwa" || tech.id === "tauri") &&
|
||||
!hasWebFrontendSelected) ||
|
||||
!hasPWACompatibleFrontend) ||
|
||||
(activeTab === "auth" &&
|
||||
tech.id === "true" &&
|
||||
stack.database === "none");
|
||||
|
||||
@@ -16,6 +16,14 @@ export const TECH_OPTIONS = {
|
||||
color: "from-cyan-400 to-cyan-600",
|
||||
default: false,
|
||||
},
|
||||
{
|
||||
id: "tanstack-start",
|
||||
name: "TanStack Start",
|
||||
description: "Quick starter template from TanStack",
|
||||
icon: "🚀",
|
||||
color: "from-purple-400 to-purple-600",
|
||||
default: false,
|
||||
},
|
||||
{
|
||||
id: "native",
|
||||
name: "React Native",
|
||||
|
||||
Reference in New Issue
Block a user