@@ -3,7 +3,7 @@ import { Button, Grid, TextField, Typography } from '@mui/material';
3
3
import CircularProgress from '@mui/material/CircularProgress' ;
4
4
import IconButton from '@mui/material/IconButton' ;
5
5
import { DataGrid , GridPaginationModel } from '@mui/x-data-grid' ;
6
- import { MakeGenerics , useMatch , useNavigate } from '@tanstack/react-location' ;
6
+ import { MakeGenerics , useMatch } from '@tanstack/react-location' ;
7
7
import { getDictionary } from 'api/admin' ;
8
8
import {
9
9
deliveredOrderUpdate ,
@@ -20,6 +20,8 @@ import { useEffect, useState } from 'react';
20
20
import styles from 'styles/order.scss' ;
21
21
import { formatDateTime , getOrderStatusName , getStatusColor } from './utility' ;
22
22
23
+ const BASE_PATH = process . env . NODE_ENV === 'production' ? '/grbpwr-admin-client' : '' ;
24
+
23
25
export type OrderDetailsPathProps = MakeGenerics < {
24
26
Params : {
25
27
uuid : string ;
@@ -97,16 +99,14 @@ export const OrderDetails = () => {
97
99
setOrderStatus ( getOrderStatusName ( dictionary , orderDetails ?. order ?. orderStatusId ) ) ;
98
100
} , [ orderDetails , dictionary ] ) ;
99
101
100
- const navigate = useNavigate ( ) ;
101
-
102
102
const orderItemsColumns = [
103
103
{
104
104
field : 'thumbnail' ,
105
105
headerName : '' ,
106
106
width : 200 ,
107
107
renderCell : ( params : any ) => (
108
108
< a
109
- href = { `${ ROUTES . singleProduct } /${ params . row . orderItem . productId } ` }
109
+ href = { `${ BASE_PATH } /# ${ ROUTES . singleProduct } /${ params . row . orderItem . productId } ` }
110
110
target = '_blank'
111
111
style = { {
112
112
cursor : 'pointer' ,
0 commit comments