mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-08-02 12:16:06 -04:00
16 lines
364 B
JavaScript
16 lines
364 B
JavaScript
import { request } from "@/helpers/axios";
|
|
import { useLoader } from "@/api/useLoader";
|
|
|
|
export function useLocale() {
|
|
const { setLoader } = useLoader();
|
|
|
|
async function setLocale(locale) {
|
|
setLoader(true);
|
|
await request().post(route("frontend.locale"), { locale });
|
|
setLoader(false);
|
|
}
|
|
|
|
return {
|
|
setLocale,
|
|
};
|
|
} |