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