Skip to content

Commit

Permalink
fixed bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
salman15 committed Aug 1, 2022
1 parent 3f3ade2 commit c3f33cc
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 168 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"name": "react-api-hook-calls",
"private": false,
"version": "1.0.1",
"version": "1.0.2",
"type": "module",
"license": "MIT",
"repository": "salman15/react-api-calls",
Expand Down
41 changes: 0 additions & 41 deletions src/App.css

This file was deleted.

34 changes: 0 additions & 34 deletions src/App.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/assets/react.svg

This file was deleted.

8 changes: 4 additions & 4 deletions src/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from "./useDelete";
export * from "./useGet";
export * from "./usePost";
export * from "./usePut";
export { default as useDelete } from "./useDelete";
export { default as useGet } from "./useGet";
export { default as usePost } from "./usePost";
export { default as usePut } from "./usePut";
70 changes: 0 additions & 70 deletions src/index.css

This file was deleted.

5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
export * from "./hooks";
//import { useGet, usePost, useDelete, usePut } from "./hooks";
// export const fetchGet = useGet;
// export const fetchPost = usePost;
// export const fetchDelete = useDelete;
// export const fetchPut = usePut;
10 changes: 0 additions & 10 deletions src/main.tsx

This file was deleted.

14 changes: 7 additions & 7 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ import react from "@vitejs/plugin-react";
export default defineConfig({
build: {
lib: {
entry: path.resolve(__dirname, "src/hooks/index.ts"),
entry: path.resolve(__dirname, "src/index.ts"),
name: "React api calls",
fileName: (format) => `react-api-calls.${format}.js`,
fileName: (format) => `react-api-calls.${format}.js`
},
rollupOptions: {
external: ["react", "react-dom"],
output: {
globals: {
react: "React",
},
},
},
react: "React"
}
}
}
},
plugins: [react()],
plugins: [react()]
});

0 comments on commit c3f33cc

Please sign in to comment.