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