Make dashboard widgets more mobile responsive

This commit is contained in:
Keannu Bernasol 2023-12-03 01:15:05 +08:00
parent 6783b02163
commit fb41277746
2 changed files with 22 additions and 7 deletions

View file

@ -15,8 +15,17 @@ import {
PatchEquipmentType,
} from "../Types/Types";
const debug = false;
let backendURL;
if (debug) {
backendURL = "http://localhost:8000/";
} else {
backendURL = "https://equipment-tracker-backend.keannu1.duckdns.org/";
}
const instance = axios.create({
baseURL: "http://localhost:8000/",
baseURL: backendURL,
});
// Token Handling
@ -136,9 +145,11 @@ export function ActivationAPI(activation: ActivationType) {
.post("api/v1/accounts/users/activation/", activation)
.then(() => {
console.log("Activation Success");
return true;
})
.catch(() => {
console.log("Activation failed");
return false;
});
}
export function ResetPasswordAPI(email: string) {
@ -146,9 +157,11 @@ export function ResetPasswordAPI(email: string) {
.post("api/v1/accounts/users/reset_password/", { email: email })
.then(() => {
console.log("Activation Success");
return true;
})
.catch(() => {
console.log("Activation failed");
return false;
});
}
@ -157,9 +170,11 @@ export function ResetPasswordConfirmAPI(info: ResetPasswordConfirmType) {
.post("api/v1/accounts/users/reset_password_confirm/", info)
.then(() => {
console.log("Reset Success");
return true;
})
.catch(() => {
console.log("Reset failed");
return false;
});
}

View file

@ -87,7 +87,7 @@ export default function Dashboard() {
backgroundColor: "#a6a6a6",
alignSelf: "center",
justifyContent: "center",
width: "32rem",
width: "16rem",
}}
>
<p
@ -118,7 +118,7 @@ export default function Dashboard() {
backgroundColor: "#a6a6a6",
alignSelf: "center",
justifyContent: "center",
width: "32rem",
width: "16rem",
}}
>
<p
@ -160,7 +160,7 @@ export default function Dashboard() {
backgroundColor: "#a6a6a6",
alignSelf: "center",
justifyContent: "center",
width: "32rem",
width: "16rem",
}}
>
<p
@ -195,7 +195,7 @@ export default function Dashboard() {
backgroundColor: "#a6a6a6",
alignSelf: "center",
justifyContent: "center",
width: "32rem",
width: "16rem",
}}
>
<p
@ -497,7 +497,7 @@ export default function Dashboard() {
modal
position={"top center"}
contentStyle={{
width: "512px",
width: "32rem",
borderRadius: 16,
borderColor: "grey",
borderStyle: "solid",
@ -516,7 +516,7 @@ export default function Dashboard() {
modal
position={"top center"}
contentStyle={{
width: "512px",
width: "32rem",
borderRadius: 16,
borderColor: "grey",
borderStyle: "solid",