Web: Editor: fixed goBack
This commit is contained in:
parent
a1a2d5aa4a
commit
f4e2f76fff
@ -25,8 +25,8 @@ const PublicRoom = (props) => {
|
||||
|
||||
const navigate = useNavigate();
|
||||
const location = useLocation();
|
||||
const lastKeySymbol = location.search.indexOf("&");
|
||||
|
||||
const lastKeySymbol = location.search.indexOf("&");
|
||||
const lastIndex =
|
||||
lastKeySymbol === -1 ? location.search.length : lastKeySymbol;
|
||||
const key = location.search.substring(5, lastIndex);
|
||||
|
@ -605,12 +605,18 @@ function Editor({
|
||||
let goBack;
|
||||
const url = window.location.href;
|
||||
const search = window.location.search;
|
||||
const shareIndex = search.indexOf("share=");
|
||||
const key = search.substring(shareIndex + 6);
|
||||
|
||||
if (fileInfo) {
|
||||
let backUrl = "";
|
||||
|
||||
if (fileInfo.rootFolderType === FolderType.Rooms) {
|
||||
backUrl = `/rooms/shared/${fileInfo.folderId}/filter?folder=${fileInfo.folderId}`;
|
||||
if (key) {
|
||||
backUrl = `/rooms/share?key=${key}`;
|
||||
} else {
|
||||
backUrl = `/rooms/shared/${fileInfo.folderId}/filter?folder=${fileInfo.folderId}`;
|
||||
}
|
||||
} else {
|
||||
backUrl = `/rooms/personal/filter?folder=${fileInfo.folderId}`;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user