start new project
This commit is contained in:
parent
74206e0eb6
commit
8e77e76069
@ -3,5 +3,11 @@
|
|||||||
"@oak/oak": "jsr:@oak/oak@^17.0.0",
|
"@oak/oak": "jsr:@oak/oak@^17.0.0",
|
||||||
"@tajpouria/cors": "jsr:@tajpouria/cors@^1.2.1",
|
"@tajpouria/cors": "jsr:@tajpouria/cors@^1.2.1",
|
||||||
"react-router-dom": "npm:react-router-dom@^6.26.2"
|
"react-router-dom": "npm:react-router-dom@^6.26.2"
|
||||||
|
},
|
||||||
|
"compilerOptions": {
|
||||||
|
"jsx": "react",
|
||||||
|
"jsxFactory": "React.createElement",
|
||||||
|
"jsxFragmentFactory": "React.Fragment",
|
||||||
|
"lib": ["dom", "esnext"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1539,6 +1539,7 @@
|
|||||||
"npm:eslint-plugin-react-refresh@^0.4.7",
|
"npm:eslint-plugin-react-refresh@^0.4.7",
|
||||||
"npm:eslint@^8.57.0",
|
"npm:eslint@^8.57.0",
|
||||||
"npm:react-dom@^18.3.1",
|
"npm:react-dom@^18.3.1",
|
||||||
|
"npm:react-router-dom@^6.26.2",
|
||||||
"npm:react@^18.3.1",
|
"npm:react@^18.3.1",
|
||||||
"npm:typescript@^5.2.2",
|
"npm:typescript@^5.2.2",
|
||||||
"npm:vite@^5.3.4"
|
"npm:vite@^5.3.4"
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { BrowserRouter, Route, Routes } from "react-router-dom";
|
import React, { BrowserRouter, Route, Routes } from "react-router-dom";
|
||||||
import Index from "./pages/index";
|
import Index from "./pages/index.tsx";
|
||||||
import Dinosaur from "./pages/Dinosaur";
|
import Dinosaur from "./pages/Dinosaur.tsx";
|
||||||
import "./App.css";
|
import "./App.css";
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
|
import React from "react";
|
||||||
import ReactDOM from "react-dom/client";
|
import ReactDOM from "react-dom/client";
|
||||||
import App from "./App";
|
import App from "./App.tsx";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
|
|
||||||
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { Link, useParams } from "react-router-dom";
|
import { Link, useParams } from "react-router-dom";
|
||||||
import { Dino } from "../types";
|
import { Dino } from "../types.ts";
|
||||||
|
|
||||||
export default function Dinosaur() {
|
export default function Dinosaur() {
|
||||||
const { selectedDinosaur } = useParams();
|
const { selectedDinosaur } = useParams();
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { Dino } from "../types.ts";
|
import { Dino } from "../types.ts";
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ export default function Index() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<main>
|
<main>
|
||||||
<h1>Welcome to the Dinosaur app</h1>
|
<h1>Dinosaur Home</h1>
|
||||||
<p>Click on a dinosaur below to learn more.</p>
|
<p>Click on a dinosaur below to learn more.</p>
|
||||||
{dinosaurs.map((dinosaur: Dino) => {
|
{dinosaurs.map((dinosaur: Dino) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -1,27 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true,
|
|
||||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
||||||
"target": "ES2020",
|
|
||||||
"useDefineForClassFields": true,
|
|
||||||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
||||||
"module": "ESNext",
|
|
||||||
"skipLibCheck": true,
|
|
||||||
|
|
||||||
/* Bundler mode */
|
|
||||||
"moduleResolution": "bundler",
|
|
||||||
"allowImportingTsExtensions": true,
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"isolatedModules": true,
|
|
||||||
"moduleDetection": "force",
|
|
||||||
"noEmit": true,
|
|
||||||
"jsx": "react-jsx",
|
|
||||||
|
|
||||||
/* Linting */
|
|
||||||
"strict": true,
|
|
||||||
"noUnusedLocals": true,
|
|
||||||
"noUnusedParameters": true,
|
|
||||||
"noFallthroughCasesInSwitch": true
|
|
||||||
},
|
|
||||||
"include": ["src", "tsconfig.json"]
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"files": [],
|
|
||||||
"references": [
|
|
||||||
{
|
|
||||||
"path": "./tsconfig.app.json"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./tsconfig.node.json"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true,
|
|
||||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"module": "ESNext",
|
|
||||||
"moduleResolution": "bundler",
|
|
||||||
"allowSyntheticDefaultImports": true,
|
|
||||||
"strict": true,
|
|
||||||
"noEmit": true
|
|
||||||
},
|
|
||||||
"include": ["vite.config.ts"]
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user