mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-05-12 19:36:41 +07:00
fixed typescript errors
This commit is contained in:
parent
9a7a038032
commit
fe311e7839
41 changed files with 786 additions and 777 deletions
|
@ -64,9 +64,8 @@ export interface State {
|
|||
|
||||
class MapListDialogUnconnected extends PureComponent<Props, State> {
|
||||
state = {
|
||||
menu_target: null,
|
||||
editor_target: null,
|
||||
|
||||
menu_target: '',
|
||||
editor_target: '',
|
||||
is_editing: false,
|
||||
is_dropping: false,
|
||||
};
|
||||
|
@ -74,7 +73,7 @@ class MapListDialogUnconnected extends PureComponent<Props, State> {
|
|||
startEditing = (editor_target: IRouteListItem['address']): void =>
|
||||
this.setState({
|
||||
editor_target,
|
||||
menu_target: null,
|
||||
menu_target: '',
|
||||
is_editing: true,
|
||||
is_dropping: false,
|
||||
});
|
||||
|
@ -86,19 +85,19 @@ class MapListDialogUnconnected extends PureComponent<Props, State> {
|
|||
|
||||
hideMenu = (): void =>
|
||||
this.setState({
|
||||
menu_target: null,
|
||||
menu_target: '',
|
||||
});
|
||||
|
||||
showDropCard = (editor_target: IRouteListItem['address']): void =>
|
||||
this.setState({
|
||||
editor_target,
|
||||
menu_target: null,
|
||||
menu_target: '',
|
||||
is_editing: false,
|
||||
is_dropping: true,
|
||||
});
|
||||
|
||||
stopEditing = (): void => {
|
||||
this.setState({ editor_target: null });
|
||||
this.setState({ editor_target: '' });
|
||||
};
|
||||
|
||||
setTitle = ({ target: { value } }: { target: { value: string } }): void => {
|
||||
|
|
|
@ -27,7 +27,7 @@ const ProviderDialogUnconnected = ({ provider, mapSetProvider }: Props) => (
|
|||
backgroundImage: `url(${replaceProviderUrl(item, { x: 5980, y: 2589, zoom: 13 })})`,
|
||||
}}
|
||||
onMouseDown={() => mapSetProvider(item)}
|
||||
key={PROVIDERS[item].name}
|
||||
key={PROVIDERS[item]?.name}
|
||||
>
|
||||
{
|
||||
provider === item &&
|
||||
|
@ -44,4 +44,4 @@ const ProviderDialogUnconnected = ({ provider, mapSetProvider }: Props) => (
|
|||
|
||||
const ProviderDialog = connect(mapStateToProps, mapDispatchToProps)(ProviderDialogUnconnected)
|
||||
|
||||
export { ProviderDialog }
|
||||
export { ProviderDialog }
|
||||
|
|
|
@ -42,7 +42,7 @@ export class TitleDialogUnconnected extends React.PureComponent<Props, State> {
|
|||
this.setMaxHeight();
|
||||
}
|
||||
|
||||
setMaxHeight = (): number => {
|
||||
setMaxHeight = () => {
|
||||
if (!this.ref_sizer || !this.ref_title || !this.ref_text) return 0;
|
||||
|
||||
const { height: sizer_height } = this.ref_sizer.getBoundingClientRect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue