Fix Format Issues f6d46b81
Maximilian Leodolter · 2025-08-07 16:17 10 file(s) · +74 −18
src/templates/extras/client/src/components/Home.tsx/Home-with-shadcn-tailwind.tsx +7 −3
1 1
import { useState } from "react";
2 2
import beaver from "@/assets/beaver.svg";
3 -
import { ApiResponse } from "shared";
3 +
import type { ApiResponse } from "shared";
4 4
import { Button } from "@/components/ui/button";
5 5
6 6
const SERVER_URL = import.meta.env.VITE_SERVER_URL || "http://localhost:3000";
20 20
21 21
	return (
22 22
		<div className="max-w-xl mx-auto flex flex-col gap-6 items-center justify-center min-h-screen">
23 -
			<a href="https://github.com/stevedylandev/bhvr" target="_blank">
23 +
			<a
24 +
				href="https://github.com/stevedylandev/bhvr"
25 +
				target="_blank"
26 +
				rel="noopener"
27 +
			>
24 28
				<img
25 29
					src={beaver}
26 30
					className="w-16 h-16 cursor-pointer"
33 37
			<div className="flex items-center gap-4">
34 38
				<Button onClick={sendRequest}>Call API</Button>
35 39
				<Button variant="secondary" asChild>
36 -
					<a target="_blank" href="https://bhvr.dev">
40 +
					<a target="_blank" href="https://bhvr.dev" rel="noopener">
37 41
						Docs
38 42
					</a>
39 43
				</Button>
src/templates/extras/client/src/components/Home.tsx/Home-with-tailwind.tsx +8 −2
1 1
import { useState } from "react";
2 2
import beaver from "../assets/beaver.svg";
3 -
import { ApiResponse } from "shared";
3 +
import type { ApiResponse } from "shared";
4 4
5 5
const SERVER_URL = import.meta.env.VITE_SERVER_URL || "http://localhost:3000";
6 6
19 19
20 20
	return (
21 21
		<div className="max-w-xl mx-auto flex flex-col gap-6 items-center justify-center min-h-screen">
22 -
			<a href="https://github.com/stevedylandev/bhvr" target="_blank">
22 +
			<a
23 +
				href="https://github.com/stevedylandev/bhvr"
24 +
				target="_blank"
25 +
				rel="noopener"
26 +
			>
23 27
				<img
24 28
					src={beaver}
25 29
					className="w-16 h-16 cursor-pointer"
31 35
			<p>A typesafe fullstack monorepo</p>
32 36
			<div className="flex items-center gap-4">
33 37
				<button
38 +
					type="button"
34 39
					onClick={sendRequest}
35 40
					className="bg-black text-white px-2.5 py-1.5 rounded-md"
36 41
				>
40 45
					target="_blank"
41 46
					href="https://bhvr.dev"
42 47
					className="border-1 border-black text-black px-2.5 py-1.5 rounded-md"
48 +
					rel="noopener"
43 49
				>
44 50
					Docs
45 51
				</a>
src/templates/extras/client/src/components/Home.tsx/Home.tsx +14 −3
21 21
	return (
22 22
		<>
23 23
			<div>
24 -
				<a href="https://github.com/stevedylandev/bhvr" target="_blank">
24 +
				<a
25 +
					href="https://github.com/stevedylandev/bhvr"
26 +
					target="_blank"
27 +
					rel="noopener"
28 +
				>
25 29
					<img src={beaver} className="logo" alt="beaver logo" />
26 30
				</a>
27 31
			</div>
30 34
			<p>A typesafe fullstack monorepo</p>
31 35
			<div className="card">
32 36
				<div className="button-container">
33 -
					<button onClick={sendRequest}>Call API</button>
34 -
					<a className="docs-link" target="_blank" href="https://bhvr.dev">
37 +
					<button type="button" onClick={sendRequest}>
38 +
						Call API
39 +
					</button>
40 +
					<a
41 +
						className="docs-link"
42 +
						target="_blank"
43 +
						href="https://bhvr.dev"
44 +
						rel="noopener"
45 +
					>
35 46
						Docs
36 47
					</a>
37 48
				</div>
src/templates/extras/client/src/main.tsx/main-with-tanstackquery-tanstackrouter.tsx +8 −1
19 19
	}
20 20
}
21 21
22 +
const rootElement = document.getElementById("root");
23 +
24 +
if (!rootElement) {
25 +
	throw new Error(
26 +
		"Root element not found. Check if it's in your index.html or if the id is correct.",
27 +
	);
28 +
}
29 +
22 30
// Render the app
23 -
const rootElement = document.getElementById("root")!;
24 31
if (!rootElement.innerHTML) {
25 32
	const root = ReactDOM.createRoot(rootElement);
26 33
	root.render(
src/templates/extras/client/src/main.tsx/main-with-tanstackrouter.tsx +8 −1
16 16
	}
17 17
}
18 18
19 +
const rootElement = document.getElementById("root");
20 +
21 +
if (!rootElement) {
22 +
	throw new Error(
23 +
		"Root element not found. Check if it's in your index.html or if the id is correct.",
24 +
	);
25 +
}
26 +
19 27
// Render the app
20 -
const rootElement = document.getElementById("root")!;
21 28
if (!rootElement.innerHTML) {
22 29
	const root = ReactDOM.createRoot(rootElement);
23 30
	root.render(
src/templates/extras/client/src/routes/__root.tsx +1 −1
1 -
import { createRootRoute, Link, Outlet } from "@tanstack/react-router";
1 +
import { createRootRoute, Outlet } from "@tanstack/react-router";
2 2
import { TanStackRouterDevtools } from "@tanstack/react-router-devtools";
3 3
4 4
export const Route = createRootRoute({
src/templates/extras/client/src/routes/index.tsx/index-with-shadcn-tailwind.tsx +6 −2
25 25
26 26
	return (
27 27
		<div className="max-w-xl mx-auto flex flex-col gap-6 items-center justify-center min-h-screen">
28 -
			<a href="https://github.com/stevedylandev/bhvr" target="_blank">
28 +
			<a
29 +
				href="https://github.com/stevedylandev/bhvr"
30 +
				target="_blank"
31 +
				rel="noopener"
32 +
			>
29 33
				<img
30 34
					src={beaver}
31 35
					className="w-16 h-16 cursor-pointer"
38 42
			<div className="flex items-center gap-4">
39 43
				<Button onClick={sendRequest}>Call API</Button>
40 44
				<Button variant="secondary" asChild>
41 -
					<a target="_blank" href="https://bhvr.dev">
45 +
					<a target="_blank" href="https://bhvr.dev" rel="noopener">
42 46
						Docs
43 47
					</a>
44 48
				</Button>
src/templates/extras/client/src/routes/index.tsx/index-with-tailwind.tsx +7 −1
24 24
25 25
	return (
26 26
		<div className="max-w-xl mx-auto flex flex-col gap-6 items-center justify-center min-h-screen">
27 -
			<a href="https://github.com/stevedylandev/bhvr" target="_blank">
27 +
			<a
28 +
				href="https://github.com/stevedylandev/bhvr"
29 +
				target="_blank"
30 +
				rel="noopener"
31 +
			>
28 32
				<img
29 33
					src={beaver}
30 34
					className="w-16 h-16 cursor-pointer"
36 40
			<p>A typesafe fullstack monorepo</p>
37 41
			<div className="flex items-center gap-4">
38 42
				<button
43 +
					type="button"
39 44
					onClick={sendRequest}
40 45
					className="bg-black text-white px-2.5 py-1.5 rounded-md"
41 46
				>
45 50
					target="_blank"
46 51
					href="https://bhvr.dev"
47 52
					className="border-1 border-black text-black px-2.5 py-1.5 rounded-md"
53 +
					rel="noopener"
48 54
				>
49 55
					Docs
50 56
				</a>
src/templates/extras/client/src/routes/index.tsx/index.tsx +14 −3
26 26
	return (
27 27
		<>
28 28
			<div>
29 -
				<a href="https://github.com/stevedylandev/bhvr" target="_blank">
29 +
				<a
30 +
					href="https://github.com/stevedylandev/bhvr"
31 +
					target="_blank"
32 +
					rel="noopener"
33 +
				>
30 34
					<img src={beaver} className="logo" alt="beaver logo" />
31 35
				</a>
32 36
			</div>
35 39
			<p>A typesafe fullstack monorepo</p>
36 40
			<div className="card">
37 41
				<div className="button-container">
38 -
					<button onClick={sendRequest}>Call API</button>
39 -
					<a className="docs-link" target="_blank" href="https://bhvr.dev">
42 +
					<button type="button" onClick={sendRequest}>
43 +
						Call API
44 +
					</button>
45 +
					<a
46 +
						className="docs-link"
47 +
						target="_blank"
48 +
						href="https://bhvr.dev"
49 +
						rel="noopener"
50 +
					>
40 51
						Docs
41 52
					</a>
42 53
				</div>
src/templates/extras/client/vite.config.ts/vite.config-with-shadcn-tailwind-tanstackrouter.ts +1 −1
1 1
import { defineConfig } from "vite";
2 2
import react from "@vitejs/plugin-react";
3 3
import tailwindcss from "@tailwindcss/vite";
4 -
import path from "path";
4 +
import path from "node:path";
5 5
import { tanstackRouter } from "@tanstack/router-plugin/vite";
6 6
7 7
export default defineConfig({