-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add milliseconds to date logs in UI (#47)
* Add milliseconds to date logs in UI * Fix imports
- Loading branch information
Showing
12 changed files
with
47 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { Filter, type FilterItem, type KindItem } from "./ui"; | ||
export { Filter } from "./ui"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,25 @@ | ||
import { createEvent, createStore, sample } from "effector"; | ||
|
||
export const DATEFORMAT_OPTIONS: Intl.DateTimeFormatOptions = { | ||
hour: "numeric", | ||
minute: "numeric", | ||
second: "numeric", | ||
fractionalSecondDigits: 3, | ||
year: "numeric", | ||
month: "numeric", | ||
day: "numeric", | ||
}; | ||
|
||
export const TIMEZONE = Intl.DateTimeFormat().resolvedOptions().timeZone; | ||
|
||
export const setDateLanguage = createEvent<string>(); | ||
|
||
export const $intl = createStore<Intl.DateTimeFormat>(Intl.DateTimeFormat()); | ||
|
||
sample({ | ||
source: setDateLanguage, | ||
fn: (lang) => { | ||
return Intl.DateTimeFormat(lang, DATEFORMAT_OPTIONS); | ||
}, | ||
target: $intl, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export type FilterItem = { | ||
name: string; | ||
key: string; | ||
value: string; | ||
}; | ||
|
||
export type KindItem = { | ||
name: string; | ||
title: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters