Skip to content

Commit a03e7bf

Browse files
committed
minor changes
1 parent abf7fa2 commit a03e7bf

22 files changed

+50
-45
lines changed

ts-grpc-vite-admin/src/components/AvoRedMultiSelectField.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, {Fragment} from "react";
1+
import {Fragment} from "react";
22
import {Label, Listbox, ListboxButton, ListboxOption, ListboxOptions, Transition} from "@headlessui/react";
33
import {CheckIcon, ChevronUpDownIcon} from "@heroicons/react/20/solid";
44

@@ -56,7 +56,7 @@ const AvoRedMultiSelectField = ({
5656
})}
5757
value={option.value}
5858
>
59-
{({selected, active}) => (
59+
{({selected}) => (
6060
<>
6161
<span
6262
className={`block truncate ${

ts-grpc-vite-admin/src/components/AvoredModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, {Fragment, ReactNode} from "react"
1+
import {Fragment, ReactNode} from "react"
22
import {Dialog, Transition} from '@headlessui/react'
33

44
type AvoRedModalProps = {

ts-grpc-vite-admin/src/components/Pagination.tsx

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,5 @@
11
import {ChevronLeftIcon, ChevronRightIcon} from "@heroicons/react/20/solid";
22

3-
const items = [
4-
{
5-
id: 1,
6-
title: "Back End Developer",
7-
department: "Engineering",
8-
type: "Full-time",
9-
location: "Remote",
10-
},
11-
{
12-
id: 2,
13-
title: "Front End Developer",
14-
department: "Engineering",
15-
type: "Full-time",
16-
location: "Remote",
17-
},
18-
{
19-
id: 3,
20-
title: "User Interface Designer",
21-
department: "Design",
22-
type: "Full-time",
23-
location: "Remote",
24-
},
25-
];
26-
273
export default function Pagination() {
284
return (
295
<div className="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6">

ts-grpc-vite-admin/src/components/TextareaField.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import _ from "lodash";
2-
import React from "react";
32

43
type AvoRedTextareaFieldProps = {
54
name?: string;

ts-grpc-vite-admin/src/hooks/admin_user/UseChangePasswordHook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const UseChangePasswordHook = () => {
1010

1111
return useMutation({
1212
mutationFn: (request: any) => {
13-
13+
console.log("request", request)
1414
const req = new GetAdminUserRequest();
1515
req.setAdminUserId("resrees");
1616

ts-grpc-vite-admin/src/hooks/asset/UseCreateFolderHook.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const UseCreateFolderHook = () => {
1515
return await client.post("/create-folder", data);
1616
},
1717
onSuccess: (res) => {
18+
console.log("res", res)
1819
queryClient.invalidateQueries({ queryKey: ["asset-table"] });
1920
},
2021
});

ts-grpc-vite-admin/src/hooks/asset/UseDeleteAssetHook.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const UseDeleteAssetHook = () => {
1414
});
1515
},
1616
onSuccess: (res) => {
17+
console.log("res", res)
1718
queryClient.invalidateQueries({ queryKey: ["asset-table"] });
1819
},
1920
});

ts-grpc-vite-admin/src/hooks/asset/UseDeleteFolderHook.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const UseDeleteFolderHook = () => {
1414
});
1515
},
1616
onSuccess: (res) => {
17+
console.log("res", res)
1718
queryClient.invalidateQueries({ queryKey: ["asset-table"] });
1819
},
1920
});

ts-grpc-vite-admin/src/hooks/asset/UseStoreAssetHook.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export const UseStoreAssetHook = (parent_id: string) => {
1818
});
1919
},
2020
onSuccess: (res) => {
21+
console.log("res", res)
2122
queryClient.invalidateQueries({ queryKey: ["asset-table"] });
2223
},
2324
});

ts-grpc-vite-admin/src/hooks/misc/UseAxiosHook.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,13 @@ export const UseAxiosHook = () => {
2222
const reqInterceptor = client.interceptors.request.use(
2323
config => {
2424
const token = localStorage.getItem("token");
25-
if (!_.isEmpty(token) && !config.headers['Authorization']) {
26-
config.headers['Authorization'] = `Bearer ${token}`
25+
if (!_.isEmpty(token)) {
26+
if (!config.headers) {
27+
config.headers = {};
28+
}
29+
if (!config.headers['Authorization']) {
30+
config.headers['Authorization'] = `Bearer ${token}`;
31+
}
2732
}
2833

2934
return config;

0 commit comments

Comments
 (0)