mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? some chunk method pictures are not in English #437 feat: set the height of both html and body to 100% feat: add SharedChat feat: add shared hooks ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -715,6 +715,8 @@ export const useGetSendButtonDisabled = () => {
|
||||
|
||||
type RangeValue = [Dayjs | null, Dayjs | null] | null;
|
||||
|
||||
const getDay = (date: Dayjs) => date.format('YYYY-MM-DD');
|
||||
|
||||
export const useFetchStatsOnMount = (visible: boolean) => {
|
||||
const fetchStats = useFetchStats();
|
||||
const [pickerValue, setPickerValue] = useState<RangeValue>([
|
||||
@ -724,7 +726,10 @@ export const useFetchStatsOnMount = (visible: boolean) => {
|
||||
|
||||
useEffect(() => {
|
||||
if (visible && Array.isArray(pickerValue) && pickerValue[0]) {
|
||||
fetchStats({ fromDate: pickerValue[0], toDate: pickerValue[1] });
|
||||
fetchStats({
|
||||
fromDate: getDay(pickerValue[0]),
|
||||
toDate: getDay(pickerValue[1] ?? dayjs()),
|
||||
});
|
||||
}
|
||||
}, [fetchStats, pickerValue, visible]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user