Skip to content

Commit

Permalink
Added convertCronToText to export in adapter-react (#2817)
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox authored Nov 16, 2024
1 parent 3decc54 commit 07ab9e8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/adapter-react-v5/src/Components/ComplexCron.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { Component } from 'react';
import { Checkbox, Button, MenuItem, Select, FormControlLabel, AppBar, Tabs, Tab, TextField } from '@mui/material';

import { I18n } from '../i18n';
import convertCronToText from './SimpleCron/cronText';
import { convertCronToText } from './SimpleCron/cronText';

const styles: Record<string, React.CSSProperties> = {
mainDiv: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import 'cronstrue/locales/uk';
import 'cronstrue/locales/pt_BR';
import 'cronstrue/locales/pl';

function convertCronToText(cron: string, lang?: ioBroker.Languages): string {
export function convertCronToText(cron: string, lang?: ioBroker.Languages): string {
return cronstrue.toString(cron, { locale: lang });
}

export default convertCronToText;
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
type Theme,
} from '@mui/material';

import convertCronToText from './cronText';
import { convertCronToText } from './cronText';

import { I18n } from '../../i18n';

Expand Down
1 change: 1 addition & 0 deletions packages/adapter-react-v5/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export { UploadImage } from './Components/UploadImage';
export { Utils } from './Components/Utils';
export { withWidth } from './Components/withWidth';
export { cron2state, SimpleCron } from './Components/SimpleCron';
export { convertCronToText } from './Components/SimpleCron/cronText';
export { LoaderVendor } from './Components/Loaders/Vendor';
export { LoaderPT } from './Components/Loaders/PT';
export { LoaderMV } from './Components/Loaders/MV';
Expand Down

0 comments on commit 07ab9e8

Please sign in to comment.