мобильное меню на лендинге, ссылки исправлены + переменные для запросов на сервер
This commit is contained in:
parent
d54244eb50
commit
2881022b2d
@ -9,11 +9,8 @@ import type {
|
|||||||
RegisterResponse,
|
RegisterResponse,
|
||||||
} from "@frontend/kitui"
|
} from "@frontend/kitui"
|
||||||
|
|
||||||
const apiUrl =
|
const apiUrl = "https://" + process.env.REACT_APP_DOMAIN + "/auth"
|
||||||
process.env.NODE_ENV === "production"
|
console.log("переменная", apiUrl)
|
||||||
? "/auth"
|
|
||||||
: "https://hub.pena.digital/auth"
|
|
||||||
|
|
||||||
export async function register(
|
export async function register(
|
||||||
login: string,
|
login: string,
|
||||||
password: string,
|
password: string,
|
||||||
|
@ -3,10 +3,7 @@ import { AxiosError } from "axios"
|
|||||||
|
|
||||||
import { parseAxiosError } from "@root/utils/parse-error"
|
import { parseAxiosError } from "@root/utils/parse-error"
|
||||||
|
|
||||||
const apiUrl =
|
const apiUrl = "https://" + process.env.REACT_APP_DOMAIN + "/customer"
|
||||||
process.env.NODE_ENV === "production"
|
|
||||||
? "/customer"
|
|
||||||
: "https://hub.pena.digital/customer"
|
|
||||||
|
|
||||||
export async function patchCart(
|
export async function patchCart(
|
||||||
tariffId: string
|
tariffId: string
|
||||||
|
@ -28,7 +28,7 @@ const regList:Record<string, number> = {
|
|||||||
export async function getHistory(): Promise<[GetHistoryResponse | null, string?]> {
|
export async function getHistory(): Promise<[GetHistoryResponse | null, string?]> {
|
||||||
try {
|
try {
|
||||||
const historyResponse = await makeRequest<never, GetHistoryResponse>({
|
const historyResponse = await makeRequest<never, GetHistoryResponse>({
|
||||||
url: "https://hub.pena.digital/customer/history?page=1&limit=100&type=payCart",
|
url: "https://" + process.env.REACT_APP_DOMAIN + "/customer/history?page=1&limit=100&type=payCart",
|
||||||
method: "get",
|
method: "get",
|
||||||
useToken: true,
|
useToken: true,
|
||||||
})
|
})
|
||||||
|
@ -4,7 +4,7 @@ import { parseAxiosError } from "@root/utils/parse-error"
|
|||||||
|
|
||||||
import type { GetDiscountsResponse } from "@root/model/discount"
|
import type { GetDiscountsResponse } from "@root/model/discount"
|
||||||
|
|
||||||
const apiUrl = process.env.NODE_ENV === "production" ? "/price" : "https://hub.pena.digital/price"
|
const apiUrl = "https://" + process.env.REACT_APP_DOMAIN + "/price"
|
||||||
|
|
||||||
export async function getDiscounts(signal: AbortSignal | undefined): Promise<[GetDiscountsResponse | null, string?]> {
|
export async function getDiscounts(signal: AbortSignal | undefined): Promise<[GetDiscountsResponse | null, string?]> {
|
||||||
try {
|
try {
|
||||||
|
@ -4,7 +4,7 @@ import { parseAxiosError } from "@root/utils/parse-error"
|
|||||||
export async function getRecentlyPurchasedTariffs(): Promise<[any | null, string?]> {
|
export async function getRecentlyPurchasedTariffs(): Promise<[any | null, string?]> {
|
||||||
try {
|
try {
|
||||||
const recentlyPurchased = await makeRequest<never, any>({
|
const recentlyPurchased = await makeRequest<never, any>({
|
||||||
url: "https://hub.pena.digital/customer/recent",
|
url: "https://" + process.env.REACT_APP_DOMAIN + "/customer/recent",
|
||||||
method: "get",
|
method: "get",
|
||||||
useToken: true,
|
useToken: true,
|
||||||
})
|
})
|
||||||
|
@ -5,7 +5,7 @@ import { parseAxiosError } from "@root/utils/parse-error"
|
|||||||
import type { ServiceKeyToPrivilegesMap } from "@root/model/privilege"
|
import type { ServiceKeyToPrivilegesMap } from "@root/model/privilege"
|
||||||
import type { GetTariffsResponse } from "@root/model/tariff"
|
import type { GetTariffsResponse } from "@root/model/tariff"
|
||||||
|
|
||||||
const apiUrl = process.env.NODE_ENV === "production" ? "/strator" : "https://hub.pena.digital/strator"
|
const apiUrl = "https://" + process.env.REACT_APP_DOMAIN + "/strator"
|
||||||
|
|
||||||
export async function getTariffs(
|
export async function getTariffs(
|
||||||
apiPage: number,
|
apiPage: number,
|
||||||
|
@ -3,10 +3,7 @@ import { parseAxiosError } from "@root/utils/parse-error"
|
|||||||
|
|
||||||
import { SendTicketMessageRequest } from "@frontend/kitui"
|
import { SendTicketMessageRequest } from "@frontend/kitui"
|
||||||
|
|
||||||
const apiUrl =
|
const apiUrl = "https://" + process.env.REACT_APP_DOMAIN + "/heruvym"
|
||||||
process.env.NODE_ENV === "production"
|
|
||||||
? "/heruvym"
|
|
||||||
: "https://hub.pena.digital/heruvym"
|
|
||||||
|
|
||||||
export async function sendTicketMessage(
|
export async function sendTicketMessage(
|
||||||
ticketId: string,
|
ticketId: string,
|
||||||
|
@ -2,10 +2,7 @@ import { User, makeRequest } from "@frontend/kitui"
|
|||||||
import { PatchUserRequest } from "@root/model/user"
|
import { PatchUserRequest } from "@root/model/user"
|
||||||
import { parseAxiosError } from "@root/utils/parse-error"
|
import { parseAxiosError } from "@root/utils/parse-error"
|
||||||
|
|
||||||
const apiUrl =
|
const apiUrl = "https://" + process.env.REACT_APP_DOMAIN + "/user"
|
||||||
process.env.NODE_ENV === "production"
|
|
||||||
? "/user"
|
|
||||||
: "https://hub.pena.digital/user"
|
|
||||||
|
|
||||||
export async function patchUser(
|
export async function patchUser(
|
||||||
user: PatchUserRequest
|
user: PatchUserRequest
|
||||||
|
@ -9,10 +9,7 @@ import type {
|
|||||||
UpdateDocumentsArgs,
|
UpdateDocumentsArgs,
|
||||||
} from "@root/model/auth"
|
} from "@root/model/auth"
|
||||||
|
|
||||||
const apiUrl =
|
const apiUrl = "https://" + process.env.REACT_APP_DOMAIN + "/verification"
|
||||||
process.env.NODE_ENV === "production"
|
|
||||||
? "/verification"
|
|
||||||
: "https://hub.pena.digital/verification"
|
|
||||||
|
|
||||||
export async function verification(
|
export async function verification(
|
||||||
userId: string
|
userId: string
|
||||||
|
@ -2,10 +2,7 @@ import { makeRequest } from "@frontend/kitui"
|
|||||||
import { SendPaymentRequest, SendPaymentResponse } from "@root/model/wallet"
|
import { SendPaymentRequest, SendPaymentResponse } from "@root/model/wallet"
|
||||||
import { parseAxiosError } from "@root/utils/parse-error"
|
import { parseAxiosError } from "@root/utils/parse-error"
|
||||||
|
|
||||||
const apiUrl =
|
const apiUrl = "https://" + process.env.REACT_APP_DOMAIN + "/customer"
|
||||||
process.env.NODE_ENV === "production"
|
|
||||||
? "/customer"
|
|
||||||
: "https://hub.pena.digital/customer"
|
|
||||||
|
|
||||||
const testPaymentBody: SendPaymentRequest = {
|
const testPaymentBody: SendPaymentRequest = {
|
||||||
type: "bankCard",
|
type: "bankCard",
|
||||||
|
@ -48,6 +48,7 @@ export const DropDownMenu = ({ anchorElement, setAnchorElement, items = [] }: Dr
|
|||||||
transition: ".2s",
|
transition: ".2s",
|
||||||
}}
|
}}
|
||||||
to={url}
|
to={url}
|
||||||
|
target="_blank"
|
||||||
>
|
>
|
||||||
{name}
|
{name}
|
||||||
<span
|
<span
|
||||||
|
@ -62,7 +62,7 @@ export default function Chat({ sx }: Props) {
|
|||||||
const chatBoxRef = useRef<HTMLDivElement>(null)
|
const chatBoxRef = useRef<HTMLDivElement>(null)
|
||||||
|
|
||||||
useTicketMessages({
|
useTicketMessages({
|
||||||
url: "https://hub.pena.digital/heruvym/getMessages",
|
url: "https://" + process.env.REACT_APP_DOMAIN + "/heruvym/getMessages",
|
||||||
isUnauth: true,
|
isUnauth: true,
|
||||||
ticketId: sessionData?.ticketId,
|
ticketId: sessionData?.ticketId,
|
||||||
messagesPerPage,
|
messagesPerPage,
|
||||||
@ -81,7 +81,7 @@ export default function Chat({ sx }: Props) {
|
|||||||
|
|
||||||
useSSESubscription<TicketMessage>({
|
useSSESubscription<TicketMessage>({
|
||||||
enabled: Boolean(sessionData),
|
enabled: Boolean(sessionData),
|
||||||
url: `https://hub.pena.digital/heruvym/ticket?ticket=${sessionData?.ticketId}&s=${sessionData?.sessionId}`,
|
url: "https://" + process.env.REACT_APP_DOMAIN + `/heruvym/ticket?ticket=${sessionData?.ticketId}&s=${sessionData?.sessionId}`,
|
||||||
onNewData: addOrUpdateUnauthMessages,
|
onNewData: addOrUpdateUnauthMessages,
|
||||||
onDisconnect: useCallback(() => {
|
onDisconnect: useCallback(() => {
|
||||||
setUnauthIsPreventAutoscroll(false)
|
setUnauthIsPreventAutoscroll(false)
|
||||||
@ -131,7 +131,7 @@ export default function Chat({ sx }: Props) {
|
|||||||
if (!sessionData) {
|
if (!sessionData) {
|
||||||
setIsMessageSending(true)
|
setIsMessageSending(true)
|
||||||
createTicket({
|
createTicket({
|
||||||
url: "https://hub.pena.digital/heruvym/create",
|
url: "https://" + process.env.REACT_APP_DOMAIN + "/heruvym/create",
|
||||||
body: {
|
body: {
|
||||||
Title: "Unauth title",
|
Title: "Unauth title",
|
||||||
Message: messageField,
|
Message: messageField,
|
||||||
|
@ -57,10 +57,10 @@ export default function Footer() {
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Link to="https://shab.pena.digital/docs/oferta">
|
<Link to="https://hub.pena.digital/docs/oferta" target="_blank">
|
||||||
<Button variant="pena-navitem-dark">Оферта</Button>
|
<Button variant="pena-navitem-dark">Оферта</Button>
|
||||||
</Link>
|
</Link>
|
||||||
<Link to="https://shab.pena.digital/docs/privacy">
|
<Link to="https://hub.pena.digital/docs/privacy" target="_blank">
|
||||||
<Button variant="pena-navitem-dark">Политика конфиденциальности</Button>
|
<Button variant="pena-navitem-dark">Политика конфиденциальности</Button>
|
||||||
</Link>
|
</Link>
|
||||||
{/* <Button variant="pena-navitem-dark">Меню 1</Button>
|
{/* <Button variant="pena-navitem-dark">Меню 1</Button>
|
||||||
|
@ -25,7 +25,7 @@ export default function Menu() {
|
|||||||
{
|
{
|
||||||
name: "Наши продукты",
|
name: "Наши продукты",
|
||||||
url: "/faq",
|
url: "/faq",
|
||||||
subMenu: [{ name: "PenaQuiz", url: "https://squiz.pena.digital" }],
|
subMenu: [{ name: "PenaQuiz", url: "https://quiz.pena.digital" }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Наши услуги",
|
name: "Наши услуги",
|
||||||
@ -100,6 +100,7 @@ export default function Menu() {
|
|||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
}}
|
}}
|
||||||
to={url}
|
to={url}
|
||||||
|
target="_blank"
|
||||||
onMouseEnter={() => setActiveSubMenu(subMenu)}
|
onMouseEnter={() => setActiveSubMenu(subMenu)}
|
||||||
state={{ previousUrl: location.pathname }}
|
state={{ previousUrl: location.pathname }}
|
||||||
>
|
>
|
||||||
|
@ -64,6 +64,7 @@ export default function DialogMenu({ open, handleClose }: DialogMenuProps) {
|
|||||||
const cash = useUserStore((state) => state.userAccount?.wallet.cash) ?? 0;
|
const cash = useUserStore((state) => state.userAccount?.wallet.cash) ?? 0;
|
||||||
|
|
||||||
const [subMenuOpen, setSubMenuOpen] = useState(false);
|
const [subMenuOpen, setSubMenuOpen] = useState(false);
|
||||||
|
const [subMenuProdOpen, setSubMenuProdOpen] = useState(false)
|
||||||
|
|
||||||
const isMobileHeight = useMediaQuery("(max-height: 400px)");
|
const isMobileHeight = useMediaQuery("(max-height: 400px)");
|
||||||
|
|
||||||
@ -104,7 +105,7 @@ export default function DialogMenu({ open, handleClose }: DialogMenuProps) {
|
|||||||
<Button
|
<Button
|
||||||
component={Link}
|
component={Link}
|
||||||
to="/faq"
|
to="/faq"
|
||||||
onClick={handleClose}
|
onClick={() => setSubMenuProdOpen(!subMenuProdOpen)}
|
||||||
state={user ? undefined : { backgroundLocation: location }}
|
state={user ? undefined : { backgroundLocation: location }}
|
||||||
disableRipple
|
disableRipple
|
||||||
variant="text"
|
variant="text"
|
||||||
@ -124,6 +125,43 @@ export default function DialogMenu({ open, handleClose }: DialogMenuProps) {
|
|||||||
>
|
>
|
||||||
Наши продукты
|
Наши продукты
|
||||||
</Button>
|
</Button>
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
ml: "20px",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: isTablet ? "flex-start" : "flex-end",
|
||||||
|
flexDirection: "column",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{subMenuProdOpen ?
|
||||||
|
<Button
|
||||||
|
component={Link}
|
||||||
|
to={"https://quiz.pena.digital/"}
|
||||||
|
state={user ? undefined : {backgroundLocation: location}}
|
||||||
|
disableRipple
|
||||||
|
variant="text"
|
||||||
|
target="_blank"
|
||||||
|
sx={{
|
||||||
|
fontWeight: "500",
|
||||||
|
// color: location.pathname === url ? theme.palette.purple.main : location.pathname === "/" ? "white" : "black",
|
||||||
|
|
||||||
|
color: "white",
|
||||||
|
height: "fit-content",
|
||||||
|
textTransform: "none",
|
||||||
|
marginBottom: "19px",
|
||||||
|
fontSize: "16px",
|
||||||
|
"&:hover": {
|
||||||
|
background: "none",
|
||||||
|
color: theme.palette.purple.main,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
PenaQuiz
|
||||||
|
</Button>
|
||||||
|
: null
|
||||||
|
}
|
||||||
|
</Box>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
onClick={() => setSubMenuOpen(!subMenuOpen)}
|
onClick={() => setSubMenuOpen(!subMenuOpen)}
|
||||||
disableRipple
|
disableRipple
|
||||||
@ -148,7 +186,7 @@ export default function DialogMenu({ open, handleClose }: DialogMenuProps) {
|
|||||||
sx={{
|
sx={{
|
||||||
ml: "20px",
|
ml: "20px",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "flex-start",
|
alignItems: isTablet ? "flex-start" : "flex-end",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -160,11 +198,12 @@ export default function DialogMenu({ open, handleClose }: DialogMenuProps) {
|
|||||||
to={url}
|
to={url}
|
||||||
state={user ? undefined : { backgroundLocation: location }}
|
state={user ? undefined : { backgroundLocation: location }}
|
||||||
disableRipple
|
disableRipple
|
||||||
|
target="_blank"
|
||||||
variant="text"
|
variant="text"
|
||||||
sx={{
|
sx={{
|
||||||
fontWeight: "500",
|
fontWeight: "500",
|
||||||
// color: location.pathname === url ? theme.palette.purple.main : location.pathname === "/" ? "white" : "black",
|
// color: location.pathname === url ? theme.palette.purple.main : location.pathname === "/" ? "white" : "black",
|
||||||
|
textAlign: isTablet ? "start" : "end",
|
||||||
color: "white",
|
color: "white",
|
||||||
height: "fit-content",
|
height: "fit-content",
|
||||||
textTransform: "none",
|
textTransform: "none",
|
||||||
@ -190,7 +229,7 @@ export default function DialogMenu({ open, handleClose }: DialogMenuProps) {
|
|||||||
to={user ? "/tariffs" : "/signin"}
|
to={user ? "/tariffs" : "/signin"}
|
||||||
state={user ? undefined : { backgroundLocation: location }}
|
state={user ? undefined : { backgroundLocation: location }}
|
||||||
variant="pena-contained-dark"
|
variant="pena-contained-dark"
|
||||||
sx={{ px: "30px", ml: "40px", width: "245px", mt: subMenuOpen ? "50px" : "0" }}
|
sx={{ px: "30px", ml: "40px", width: "245px", mt: "50px" }}
|
||||||
>
|
>
|
||||||
Регистрация / Войти
|
Регистрация / Войти
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -25,7 +25,7 @@ export default function ProtectedLayout() {
|
|||||||
const ticketsPerPage = useTicketStore((state) => state.ticketsPerPage)
|
const ticketsPerPage = useTicketStore((state) => state.ticketsPerPage)
|
||||||
|
|
||||||
useSSESubscription<Ticket>({
|
useSSESubscription<Ticket>({
|
||||||
url: `https://hub.pena.digital/heruvym/subscribe?Authorization=${token}`,
|
url: "https://" + process.env.REACT_APP_DOMAIN + `/heruvym/subscribe?Authorization=${token}`,
|
||||||
onNewData: (data) => {
|
onNewData: (data) => {
|
||||||
updateTickets(data.filter((d) => Boolean(d.id)))
|
updateTickets(data.filter((d) => Boolean(d.id)))
|
||||||
setTicketCount(data.length)
|
setTicketCount(data.length)
|
||||||
@ -34,7 +34,7 @@ export default function ProtectedLayout() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
useTicketsFetcher({
|
useTicketsFetcher({
|
||||||
url: "https://hub.pena.digital/heruvym/getTickets",
|
url: "https://" + process.env.REACT_APP_DOMAIN + "/heruvym/getTickets",
|
||||||
ticketsPerPage,
|
ticketsPerPage,
|
||||||
ticketApiPage,
|
ticketApiPage,
|
||||||
onSuccess: (result) => {
|
onSuccess: (result) => {
|
||||||
|
@ -30,7 +30,7 @@ export default () => (
|
|||||||
Настоящая политика обработки персональных данных составлена в соответствии с требованиями Федерального
|
Настоящая политика обработки персональных данных составлена в соответствии с требованиями Федерального
|
||||||
закона от 27.07.2006. № 152-ФЗ «О персональных данных» (далее — Закон о персональных данных) и определяет
|
закона от 27.07.2006. № 152-ФЗ «О персональных данных» (далее — Закон о персональных данных) и определяет
|
||||||
порядок обработки персональных данных и меры по обеспечению безопасности персональных данных,
|
порядок обработки персональных данных и меры по обеспечению безопасности персональных данных,
|
||||||
предпринимаемые ООО "Пена") (далее — Оператор).
|
предпринимаемые ООО "ПЕНА") (далее — Оператор).
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography></Typography>
|
<Typography></Typography>
|
||||||
<Typography>
|
<Typography>
|
||||||
@ -41,7 +41,7 @@ export default () => (
|
|||||||
<Typography></Typography>
|
<Typography></Typography>
|
||||||
<Typography>
|
<Typography>
|
||||||
1.2. Настоящая политика Оператора в отношении обработки персональных данных (далее — Политика) применяется
|
1.2. Настоящая политика Оператора в отношении обработки персональных данных (далее — Политика) применяется
|
||||||
ко всей информации, которую Оператор может получить о посетителях веб-сайта https://quiz.pena.digital.
|
ко всей информации, которую Оператор может получить о посетителях веб-сайта https://pena.digital.
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography></Typography>
|
<Typography></Typography>
|
||||||
<Typography variant="h6" sx={{ textAlign: "center" }}>
|
<Typography variant="h6" sx={{ textAlign: "center" }}>
|
||||||
@ -60,7 +60,7 @@ export default () => (
|
|||||||
<Typography></Typography>
|
<Typography></Typography>
|
||||||
<Typography>
|
<Typography>
|
||||||
2.3. Веб-сайт — совокупность графических и информационных материалов, а также программ для ЭВМ и баз данных,
|
2.3. Веб-сайт — совокупность графических и информационных материалов, а также программ для ЭВМ и баз данных,
|
||||||
обеспечивающих их доступность в сети интернет по сетевому адресу https://quiz.pena.digital.
|
обеспечивающих их доступность в сети интернет по сетевому адресу https://pena.digital.
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography></Typography>
|
<Typography></Typography>
|
||||||
<Typography>
|
<Typography>
|
||||||
@ -91,7 +91,7 @@ export default () => (
|
|||||||
<Typography></Typography>
|
<Typography></Typography>
|
||||||
<Typography>
|
<Typography>
|
||||||
2.8. Персональные данные — любая информация, относящаяся прямо или косвенно к определенному или определяемому
|
2.8. Персональные данные — любая информация, относящаяся прямо или косвенно к определенному или определяемому
|
||||||
Пользователю веб-сайта https://quiz.pena.digital.
|
Пользователю веб-сайта https://pena.digital.
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography></Typography>
|
<Typography></Typography>
|
||||||
<Typography>
|
<Typography>
|
||||||
@ -102,7 +102,7 @@ export default () => (
|
|||||||
</Typography>
|
</Typography>
|
||||||
<Typography></Typography>
|
<Typography></Typography>
|
||||||
<Typography>
|
<Typography>
|
||||||
2.10. Пользователь — любой посетитель веб-сайта https://quiz.pena.digital.
|
2.10. Пользователь — любой посетитель веб-сайта https://pena.digital.
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography></Typography>
|
<Typography></Typography>
|
||||||
<Typography>
|
<Typography>
|
||||||
|
@ -39,7 +39,7 @@ const App = () => {
|
|||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|
||||||
useUserFetcher({
|
useUserFetcher({
|
||||||
url: `https://hub.pena.digital/user/${userId}`,
|
url: "https://" + process.env.REACT_APP_DOMAIN + `/user/${userId}`,
|
||||||
userId,
|
userId,
|
||||||
onNewUser: setUser,
|
onNewUser: setUser,
|
||||||
onError: (error) => {
|
onError: (error) => {
|
||||||
@ -53,7 +53,7 @@ const App = () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
useUserAccountFetcher({
|
useUserAccountFetcher({
|
||||||
url: "https://hub.pena.digital/customer/account",
|
url: "https://" + process.env.REACT_APP_DOMAIN + "/customer/account",
|
||||||
userId,
|
userId,
|
||||||
onNewUserAccount: setUserAccount,
|
onNewUserAccount: setUserAccount,
|
||||||
onError: (error) => {
|
onError: (error) => {
|
||||||
|
@ -40,7 +40,7 @@ export default function History() {
|
|||||||
try {
|
try {
|
||||||
await makeRequest (
|
await makeRequest (
|
||||||
{
|
{
|
||||||
url: `https://hub.pena.digital/customer/sendReport/${tariffId}`,
|
url: "https://" + process.env.REACT_APP_DOMAIN + `/customer/sendReport/${tariffId}`,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -17,7 +17,7 @@ export default function CreateTicket() {
|
|||||||
if (!ticketBodyField || !ticketNameField) return
|
if (!ticketBodyField || !ticketNameField) return
|
||||||
|
|
||||||
createTicket({
|
createTicket({
|
||||||
url: "https://hub.pena.digital/heruvym/create",
|
url: "https://" + process.env.REACT_APP_DOMAIN + "/heruvym/create",
|
||||||
body: {
|
body: {
|
||||||
Title: ticketNameField,
|
Title: ticketNameField,
|
||||||
Message: ticketBodyField,
|
Message: ticketBodyField,
|
||||||
|
@ -58,7 +58,7 @@ function SupportChat() {
|
|||||||
const fetchState = useMessageStore((state) => state.ticketMessageFetchState)
|
const fetchState = useMessageStore((state) => state.ticketMessageFetchState)
|
||||||
|
|
||||||
useTicketMessages({
|
useTicketMessages({
|
||||||
url: "https://hub.pena.digital/heruvym/getMessages",
|
url: "https://" + process.env.REACT_APP_DOMAIN + "/heruvym/getMessages",
|
||||||
ticketId,
|
ticketId,
|
||||||
messagesPerPage,
|
messagesPerPage,
|
||||||
messageApiPage,
|
messageApiPage,
|
||||||
@ -76,7 +76,7 @@ function SupportChat() {
|
|||||||
|
|
||||||
useSSESubscription<TicketMessage>({
|
useSSESubscription<TicketMessage>({
|
||||||
enabled: Boolean(token) && Boolean(ticketId),
|
enabled: Boolean(token) && Boolean(ticketId),
|
||||||
url: `https://hub.pena.digital/heruvym/ticket?ticket=${ticketId}&Authorization=${token}`,
|
url: "https://" + process.env.REACT_APP_DOMAIN + `/heruvym/ticket?ticket=${ticketId}&Authorization=${token}`,
|
||||||
onNewData: addOrUpdateMessages,
|
onNewData: addOrUpdateMessages,
|
||||||
onDisconnect: useCallback(() => {
|
onDisconnect: useCallback(() => {
|
||||||
clearMessageState()
|
clearMessageState()
|
||||||
|
Loading…
Reference in New Issue
Block a user