Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Commit

Permalink
JSX.Element > React.ReactElement
Browse files Browse the repository at this point in the history
  • Loading branch information
igorweber committed Nov 24, 2023
1 parent 3dfcf57 commit ded6113
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const hentDagliste = (
meldekortdager: MeldekortDag[],
typeYtelsePostfix: string,
medUtvidetInformasjon: boolean = true
): JSX.Element[] => {
): React.ReactElement[] => {
const dagListe = [];
const ukedager = hentUkedagerSomStringListe();

Expand Down
4 changes: 2 additions & 2 deletions src/app/components/sprakvelger/sprakvelger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const renderMenuItem = (locale: Locale, valgtSprak: string) => {
const Sprakvelger: React.FunctionComponent<MergedProps> = props => {
const { currentLocale, locales, aktivtMeldekort, settLocale } = props;

const handleSelection = (value: JSX.Element[]) => {
const handleSelection = (value: React.ReactElement[]) => {
const newLocale: string = value[1].key
? value[1].key.toString()
: Konstanter.defaultLocale;
Expand All @@ -67,7 +67,7 @@ const Sprakvelger: React.FunctionComponent<MergedProps> = props => {
<div className="languageToggle">
<Wrapper
className="languageToggle__wrapper"
onSelection={(value: JSX.Element[]) => handleSelection(value)}
onSelection={(value: React.ReactElement[]) => handleSelection(value)}
>
<Button className="languageToggle__button">
<div className="languageToggle__button__flag">
Expand Down
2 changes: 1 addition & 1 deletion src/app/reducers/localesReducer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import EngelskFlaggSVG from "../components/sprakvelger/EngelskFlaggSVG";
export interface Locale {
label: string;
tittel: string;
ikon: JSX.Element;
ikon: React.ReactElement;
}

const locales = [
Expand Down
4 changes: 2 additions & 2 deletions src/app/types/meldekort.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,6 @@ export interface MeldekortRad {

export interface MeldekortKolonne {
key: string;
label: JSX.Element;
cell?: ((row: DetaljRad | HistoriskeMeldekortRad) => string | JSX.Element) | string;
label: React.ReactElement;
cell?: ((row: DetaljRad | HistoriskeMeldekortRad) => string | React.ReactElement) | string;
}
2 changes: 1 addition & 1 deletion src/app/utils/intlUtil.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const formatMessage = (id: string | undefined, values?: object): string =

// FormattedHTMLMessage & intl.formatHTMLMessage har blitt fjernet fra react-intl v4
// FormattedMessage og intl.formatMessage viser ikke HTML
export const formatHtmlMessage = (id: string | undefined, values?: object): JSX.Element => {
export const formatHtmlMessage = (id: string | undefined, values?: object): React.ReactElement => {
const text = formatMessage(id, values)

return (
Expand Down

0 comments on commit ded6113

Please sign in to comment.