mirror of
https://github.com/mue/mue.git
synced 2026-07-16 21:44:22 +02:00
feat: deep links for rest of settings
This commit is contained in:
@@ -7,7 +7,7 @@ import Navbar from '../../navbar/Navbar';
|
||||
import Preview from '../../helpers/preview/Preview';
|
||||
|
||||
import EventBus from 'utils/eventbus';
|
||||
import { parseDeepLink, shouldAutoOpenModal } from 'utils/deepLinking';
|
||||
import { parseDeepLink, shouldAutoOpenModal, updateHash } from 'utils/deepLinking';
|
||||
|
||||
import Welcome from 'features/welcome/Welcome';
|
||||
|
||||
@@ -88,6 +88,10 @@ const Modals = () => {
|
||||
|
||||
if (action !== false) {
|
||||
variables.stats.postEvent('modal', `Opened ${type.replace('Modal', '')}`);
|
||||
// Set initial hash when opening main modal
|
||||
if (type === 'mainModal') {
|
||||
updateHash('#settings');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -95,6 +95,9 @@ function Settings(props) {
|
||||
current="settings"
|
||||
currentTab={props.currentTab}
|
||||
onSectionChange={props.onSectionChange}
|
||||
deepLinkData={props.deepLinkData}
|
||||
navigationTrigger={props.navigationTrigger}
|
||||
sections={sections}
|
||||
>
|
||||
{sections.map(({ label, name, component: Component }) => (
|
||||
<div key={name} label={variables.getMessage(label)} name={name}>
|
||||
|
||||
Reference in New Issue
Block a user