Skip to content

Commit

Permalink
Update replayUrl if isDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
wqcstrong committed Sep 27, 2024
1 parent 0d61d5b commit bb05358
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/ReplayLabs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import WholeBundle from '@huolala-tech/page-spy-plugin-whole-bundle';
import '@huolala-tech/page-spy-plugin-whole-bundle/dist/index.css';
import { useEffect } from 'react';
import { getReplayUrl } from '../LogList/SelectLogButton';
import { isDoc } from '@/utils/constants';

export const ReplayLabs = () => {
useEffect(() => {
Expand Down Expand Up @@ -35,7 +36,10 @@ export const ReplayLabs = () => {
maxCount={1}
customRequest={async (file) => {
const url = URL.createObjectURL(file.file as File);
const replayURL = getReplayUrl(url);
let replayURL = getReplayUrl(url);
if (isDoc) {
replayURL = `https://pagespy.org/#/replay?url=${url}#Console`;
}
setTimeout(() => {
window.open(replayURL);
}, 50);
Expand Down

0 comments on commit bb05358

Please sign in to comment.