push rasad front on new repo
This commit is contained in:
22
src/utils/getProvinceName.js
Normal file
22
src/utils/getProvinceName.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import { useSelector } from "react-redux";
|
||||
|
||||
export const useProvinceName = () => {
|
||||
const userPath = useSelector((state) => state.userSlice.userPath);
|
||||
|
||||
let province;
|
||||
if (userPath === "https://testbackend.rasadyar.com/") {
|
||||
province = "test";
|
||||
} else if (userPath === "https://mabackend.rasadyar.com/") {
|
||||
province = "markazi";
|
||||
} else if (userPath === "https://arbackend.rasadyar.com/") {
|
||||
province = "ardabil";
|
||||
} else if (userPath === "https://habackend.rasadyar.com/") {
|
||||
province = "hamedan";
|
||||
} else if (userPath === "https://bubackend.rasadyar.com/") {
|
||||
province = "bushehr";
|
||||
} else {
|
||||
province = "hamedan";
|
||||
}
|
||||
|
||||
return province;
|
||||
};
|
||||
Reference in New Issue
Block a user