@lobehub/chat 0.72.0 → 0.72.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.72.1](https://github.com/lobehub/lobe-chat/compare/v0.72.0...v0.72.1)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-09-09**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: 修正异步水合造成的初始状态不稳定的问题.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: 修正异步水合造成的初始状态不稳定的问题 ([2208f8a](https://github.com/lobehub/lobe-chat/commit/2208f8a))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
## [Version 0.72.0](https://github.com/lobehub/lobe-chat/compare/v0.71.1...v0.72.0)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2023-09-09**</sup>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
|
|
3
3
|
import { useSessionStore } from '../store';
|
|
4
|
-
import {
|
|
4
|
+
import { useEffectAfterSessionHydrated } from './useEffectAfterHydrated';
|
|
5
5
|
|
|
6
6
|
export const useSessionHydrated = () => {
|
|
7
7
|
// 根据 sessions 是否有值来判断是否已经初始化
|
|
@@ -9,9 +9,9 @@ export const useSessionHydrated = () => {
|
|
|
9
9
|
|
|
10
10
|
const [isInit, setInit] = useState(hasInited);
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
useEffectAfterSessionHydrated(() => {
|
|
13
13
|
if (!isInit) setInit(true);
|
|
14
|
-
});
|
|
14
|
+
}, []);
|
|
15
15
|
|
|
16
16
|
return isInit;
|
|
17
17
|
};
|