changed ts to js
This commit is contained in:
@@ -28,8 +28,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { client } from "./utils/trpc.ts";
|
||||
console.log(client);
|
||||
import { client } from "./utils/trpc";
|
||||
client.info.getAllZones.query({}).then(console.log);
|
||||
// import MainVote from "./components/MainVote.vue";
|
||||
|
||||
export default {
|
||||
|
||||
3
src/config.js
Normal file
3
src/config.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export const CONFIG = {
|
||||
api_url: "http://localhost:3000",
|
||||
};
|
||||
@@ -1,10 +1,10 @@
|
||||
import {} from "@trpc/client";
|
||||
import { httpBatchLink, createTRPCProxyClient } from "@trpc/client";
|
||||
import { CONFIG } from "@/config";
|
||||
|
||||
export const client = createTRPCProxyClient({
|
||||
links: [
|
||||
httpBatchLink({
|
||||
url: "http://localhost:3000",
|
||||
url: CONFIG.api_url,
|
||||
}),
|
||||
],
|
||||
});
|
||||
Reference in New Issue
Block a user