Merge branch 'master' of https://git.sentientgeeks.us/Amit/mui-demo-project
This commit is contained in:
commit
fa5a4a441e
@ -53,8 +53,6 @@ const ReviewModal = ({
|
|||||||
handleClose,
|
handleClose,
|
||||||
reviewModalData,
|
reviewModalData,
|
||||||
}: ReviewModalProps) => {
|
}: ReviewModalProps) => {
|
||||||
console.log("reviewModalData", reviewModalData);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
<Modal
|
<Modal
|
||||||
|
@ -11,8 +11,6 @@ interface ReviewModalContentProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ReviewModalContent = ({ data }: ReviewModalContentProps) => {
|
const ReviewModalContent = ({ data }: ReviewModalContentProps) => {
|
||||||
// const [value, setValue] = React.useState<number | null>(data?.rating);
|
|
||||||
// const [hover, setHover] = React.useState(-1);
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Box
|
<Box
|
||||||
@ -58,12 +56,6 @@ const ReviewModalContent = ({ data }: ReviewModalContentProps) => {
|
|||||||
size="small"
|
size="small"
|
||||||
precision={0.5}
|
precision={0.5}
|
||||||
readOnly
|
readOnly
|
||||||
// onChange={(event, newValue) => {
|
|
||||||
// setValue(newValue);
|
|
||||||
// }}
|
|
||||||
// onChangeActive={(event, newHover) => {
|
|
||||||
// setHover(newHover);
|
|
||||||
// }}
|
|
||||||
emptyIcon={
|
emptyIcon={
|
||||||
<StarIcon style={{ opacity: 0.55 }} fontSize="inherit" />
|
<StarIcon style={{ opacity: 0.55 }} fontSize="inherit" />
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,6 @@ const TanStackTable = ({ data }: any) => {
|
|||||||
const handleButtonClick = (rowData: any) => {
|
const handleButtonClick = (rowData: any) => {
|
||||||
setReviewModalData(rowData?.reviews);
|
setReviewModalData(rowData?.reviews);
|
||||||
handleOpen();
|
handleOpen();
|
||||||
// console.log("Button clicked for row:", rowData?.reviews);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const table = useReactTable({
|
const table = useReactTable({
|
||||||
@ -130,7 +129,6 @@ const TanStackTable = ({ data }: any) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setTableData(data?.products);
|
setTableData(data?.products);
|
||||||
console.log("Server data", data);
|
|
||||||
}, [data]);
|
}, [data]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -93,10 +93,6 @@ export default function DashboardWrapper(props: Props) {
|
|||||||
};
|
};
|
||||||
const [activeIndex, setActiveIndex] = useState<number | null>(null);
|
const [activeIndex, setActiveIndex] = useState<number | null>(null);
|
||||||
|
|
||||||
React.useEffect(() => {
|
|
||||||
console.log("User Data", userData);
|
|
||||||
}, [userData]);
|
|
||||||
|
|
||||||
const drawer = (
|
const drawer = (
|
||||||
<>
|
<>
|
||||||
<Toolbar sx={{ minHeight: "72px !important" }}>
|
<Toolbar sx={{ minHeight: "72px !important" }}>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// api.ts
|
// api.ts
|
||||||
import axiosInstance from '../axios/axiosInstance';
|
import axiosInstance from "../axios/axiosInstance";
|
||||||
|
|
||||||
export interface LoginResponse {
|
export interface LoginResponse {
|
||||||
id: number;
|
id: number;
|
||||||
@ -18,7 +18,8 @@ interface LoginData {
|
|||||||
password: string;
|
password: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Login API POST */
|
||||||
export const loginApi = async (data: LoginData): Promise<LoginResponse> => {
|
export const loginApi = async (data: LoginData): Promise<LoginResponse> => {
|
||||||
const response = await axiosInstance.post<LoginResponse>('/auth/login', data);
|
const response = await axiosInstance.post<LoginResponse>("/auth/login", data);
|
||||||
return response.data;
|
return response.data;
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import axios, { isAxiosError } from "axios";
|
import axios, { isAxiosError } from "axios";
|
||||||
|
|
||||||
|
/** Product List Home Page */
|
||||||
const homeServices = {
|
const homeServices = {
|
||||||
getProducts: async () => {
|
getProducts: async () => {
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user