Skip to content

Commit 0fd4b3d

Browse files
authored
feat: route list refactor (#8)
2 parents 1b3eb1e + dacbcde commit 0fd4b3d

33 files changed

+1777
-149
lines changed

components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
},
1313
"aliases": {
1414
"components": "@/shared",
15-
"utils": "@/shared/lib/utils"
15+
"utils": "@/shared/lib/cn"
1616
}
1717
}

example/src/App.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
11
import "./App.css"
22

33
function App() {
4+
const testFetchVite = async () => {
5+
try {
6+
const response = await fetch("https://api.example.com/user", {
7+
method: "GET",
8+
headers: {
9+
"Content-Type": "application/json",
10+
},
11+
})
12+
const data = await response.json()
13+
console.log(data)
14+
} catch (error) {
15+
console.error(error)
16+
}
17+
}
18+
419
return (
520
<>
621
<div></div>
722
<h1>Vite + React</h1>
823
<div className="card">
9-
<button onClick={() => {}}>Test Fetch Vite</button>
24+
<button onClick={() => testFetchVite()}>Test Fetch Vite</button>
1025
</div>
1126
<p className="read-the-docs">
1227
Click on the Vite and React logos to learn more

example/src/main.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ const prepareWorker = async () => {
2020
prepareWorker().then((worker) =>
2121
ReactDOM.createRoot(document.getElementById("root")!).render(
2222
<React.StrictMode>
23-
<MSWDevtools
24-
worker={worker}
25-
isEnabled={isDev}
26-
apiUrl="https://api.example.com"
27-
>
23+
<MSWDevtools worker={worker} isEnabled={isDev}>
2824
<App />
2925
</MSWDevtools>
3026
</React.StrictMode>

package.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,36 @@
3737
"example": "pnpm build && cd example && pnpm i && pnpm dev"
3838
},
3939
"dependencies": {
40+
"@codemirror/autocomplete": "^6.16.2",
41+
"@codemirror/commands": "^6.6.0",
42+
"@codemirror/lang-json": "^6.0.1",
43+
"@codemirror/language": "^6.10.2",
44+
"@codemirror/lint": "^6.8.0",
45+
"@faker-js/faker": "^8.4.1",
4046
"@radix-ui/react-accordion": "1.1.2",
4147
"@radix-ui/react-checkbox": "^1.0.4",
4248
"@radix-ui/react-label": "^2.0.2",
49+
"@radix-ui/react-select": "^2.0.0",
4350
"@radix-ui/react-separator": "^1.0.3",
4451
"@radix-ui/react-slot": "^1.0.2",
4552
"@radix-ui/react-switch": "^1.0.3",
4653
"@radix-ui/react-tabs": "^1.0.4",
4754
"@types/react": "18.2.14",
4855
"@types/react-dom": "18.2.6",
56+
"@uiw/codemirror-theme-github": "^4.22.1",
57+
"@uiw/react-codemirror": "^4.22.1",
4958
"class-variance-authority": "^0.7.0",
5059
"clsx": "^2.1.1",
60+
"codemirror-json-schema": "^0.7.8",
61+
"codemirror-json5": "^1.0.3",
5162
"constate": "^3.3.2",
5263
"lucide-react": "0.378.0",
5364
"msw": "2.2.13",
5465
"postcss": "^8.4.38",
66+
"prettier": "^3.3.1",
5567
"react": "18.2.0",
5668
"react-dom": "18.2.0",
69+
"react-hook-form": "^7.51.5",
5770
"tailwind-merge": "2.3.0",
5871
"tailwindcss-animate": "1.0.7",
5972
"ts-pattern": "^5.1.2",

0 commit comments

Comments
 (0)