Skip to content

Commit

Permalink
feat: route list refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
minsgy committed Jun 6, 2024
1 parent f4d4e6b commit dacbcde
Show file tree
Hide file tree
Showing 16 changed files with 1,365 additions and 132 deletions.
17 changes: 16 additions & 1 deletion example/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
import "./App.css"

function App() {
const testFetchVite = async () => {
try {
const response = await fetch("https://api.example.com/user", {
method: "GET",
headers: {
"Content-Type": "application/json",
},
})
const data = await response.json()
console.log(data)
} catch (error) {
console.error(error)
}
}

return (
<>
<div></div>
<h1>Vite + React</h1>
<div className="card">
<button onClick={() => {}}>Test Fetch Vite</button>
<button onClick={() => testFetchVite()}>Test Fetch Vite</button>
</div>
<p className="read-the-docs">
Click on the Vite and React logos to learn more
Expand Down
6 changes: 1 addition & 5 deletions example/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ const prepareWorker = async () => {
prepareWorker().then((worker) =>
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<MSWDevtools
worker={worker}
isEnabled={isDev}
apiUrl="https://api.example.com"
>
<MSWDevtools worker={worker} isEnabled={isDev}>
<App />
</MSWDevtools>
</React.StrictMode>
Expand Down
13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,36 @@
"example": "pnpm build && cd example && pnpm i && pnpm dev"
},
"dependencies": {
"@codemirror/autocomplete": "^6.16.2",
"@codemirror/commands": "^6.6.0",
"@codemirror/lang-json": "^6.0.1",
"@codemirror/language": "^6.10.2",
"@codemirror/lint": "^6.8.0",
"@faker-js/faker": "^8.4.1",
"@radix-ui/react-accordion": "1.1.2",
"@radix-ui/react-checkbox": "^1.0.4",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-separator": "^1.0.3",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-switch": "^1.0.3",
"@radix-ui/react-tabs": "^1.0.4",
"@types/react": "18.2.14",
"@types/react-dom": "18.2.6",
"@uiw/codemirror-theme-github": "^4.22.1",
"@uiw/react-codemirror": "^4.22.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"codemirror-json-schema": "^0.7.8",
"codemirror-json5": "^1.0.3",
"constate": "^3.3.2",
"lucide-react": "0.378.0",
"msw": "2.2.13",
"postcss": "^8.4.38",
"prettier": "^3.3.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "^7.51.5",
"tailwind-merge": "2.3.0",
"tailwindcss-animate": "1.0.7",
"ts-pattern": "^5.1.2",
Expand Down
Loading

0 comments on commit dacbcde

Please sign in to comment.