about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/actions/languages.js
blob: ad186ba0ccd3e5050f94f6cb79213cd23a548e78 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import { saveSettings } from './settings';

export const LANGUAGE_USE = 'LANGUAGE_USE';

export const useLanguage = language => dispatch => {
  dispatch({
    type: LANGUAGE_USE,
    language,
  });

  dispatch(saveSettings());
};