Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

631 B
Raw Blame
"use client";

import { useChangeLocale, useCurrentLocale } from "@homarr/translation/client";

import { LanguageCombobox } from "./language-combobox";

interface CurrentLanguageComboboxProps {
  width?: string;
  withinPortal?: boolean;
}

export const CurrentLanguageCombobox = ({ width, withinPortal }: CurrentLanguageComboboxProps) => {
  const currentLocale = useCurrentLocale();
  const { changeLocale, isPending } = useChangeLocale();

  return (
    <LanguageCombobox
      value={currentLocale}
      onChange={changeLocale}
      isPending={isPending}
      width={width}
      withinPortal={withinPortal}
    />
  );
};