mirror of
https://github.com/RoboSats/robosats.git
synced 2025-08-03 03:31:39 +00:00
Remove unused code
This commit is contained in:
@ -14,7 +14,7 @@ const Routes: React.FC = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (window.AndroidDataRobosats && garage.currentSlot) {
|
if (window.AndroidDataRobosats && garage.currentSlot) {
|
||||||
const orderPath = window.AndroidDataRobosats.navigateToPage ?? '';
|
const orderPath = window.AndroidDataRobosats.navigateToPage ?? '';
|
||||||
const [coordinator, orderId] = orderPath.replace('#', '/').split('/');
|
const [coordinator, orderId] = orderPath.split('/');
|
||||||
window.AndroidDataRobosats = undefined;
|
window.AndroidDataRobosats = undefined;
|
||||||
|
|
||||||
if (orderId && coordinator) {
|
if (orderId && coordinator) {
|
||||||
|
@ -55,7 +55,7 @@ const NotificationCard: React.FC<Props> = ({ event, robotHashId, coordinator, se
|
|||||||
if (slot?.token) {
|
if (slot?.token) {
|
||||||
setShow(false);
|
setShow(false);
|
||||||
garage.setCurrentSlot(slot.token);
|
garage.setCurrentSlot(slot.token);
|
||||||
navigateToPage(`order/${orderId.replace('#', '/')}`, navigate);
|
navigateToPage(`order/${orderId}`, navigate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -150,7 +150,7 @@ const NotificationsDrawer = ({
|
|||||||
if (slot?.token) {
|
if (slot?.token) {
|
||||||
setShow(false);
|
setShow(false);
|
||||||
garage.setCurrentSlot(slot.token);
|
garage.setCurrentSlot(slot.token);
|
||||||
navigateToPage(`order/${orderId.replace('#', '/')}`, navigate);
|
navigateToPage(`order/${orderId}`, navigate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -141,7 +141,7 @@ export const AppContextProvider = ({ children }: AppContextProviderProps): React
|
|||||||
newPage,
|
newPage,
|
||||||
navigate,
|
navigate,
|
||||||
) => {
|
) => {
|
||||||
const pathPage: Page | string = newPage.replace('#', '/').split('/')[0];
|
const pathPage: Page | string = newPage.split('/')[0];
|
||||||
if (isPage(pathPage)) {
|
if (isPage(pathPage)) {
|
||||||
setPage(pathPage);
|
setPage(pathPage);
|
||||||
navigate(`/${newPage}`);
|
navigate(`/${newPage}`);
|
||||||
|
Reference in New Issue
Block a user