changed ts to js

This commit is contained in:
2024-04-19 20:21:02 +07:00
parent 5ba63b0869
commit 054c4f0ea8
3 changed files with 7 additions and 4 deletions

View File

@@ -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
View File

@@ -0,0 +1,3 @@
export const CONFIG = {
api_url: "http://localhost:3000",
};

View File

@@ -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,
}),
],
});