(config: IPageLayoutConfig)
| 75 | }; |
| 76 | |
| 77 | const setSettingsConfig = async (config: IPageLayoutConfig) => { |
| 78 | const layout = getAllLayoutConfig(); |
| 79 | const curIndex = layout.findIndex((v) => v.page === "__settings__"); |
| 80 | if (curIndex >= 0) { |
| 81 | layout[curIndex] = config; |
| 82 | } else { |
| 83 | layout.push(config); |
| 84 | } |
| 85 | setAllLayoutConfig(layout); |
| 86 | await saveGlobalLayoutConfig(); |
| 87 | setTimeout(() => window.location.reload(), 200); |
| 88 | }; |
| 89 | |
| 90 | return { |
| 91 | setSettingsConfig, |
nothing calls this directly
no test coverage detected