Formatting Fixes
This commit is contained in:
parent
f8ab2f12be
commit
d09df8a497
4 changed files with 42 additions and 32 deletions
|
|
@ -1,13 +1,21 @@
|
||||||
import { useState } from "react";
|
|
||||||
import { gradients } from "../../utils/styleUtils";
|
import { gradients } from "../../utils/styleUtils";
|
||||||
|
|
||||||
|
|
||||||
export default function GradientChooserComponent({ value, onChange }) {
|
export default function GradientChooserComponent({ value, onChange }) {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-wrap gap-4 justify-center items-center">
|
<div className="flex flex-wrap items-center justify-center gap-4">
|
||||||
{gradients.map((gradient, idx) =>
|
{gradients.map((gradient, idx) => (
|
||||||
<div onClick={() => {onChange(gradient)}} className={"cursor-pointer w-12 h-12 rounded-full transition-all duration-400 " + gradient + (value === gradient ? " shadow-lg ring-2 ring-primary" : "")} key={idx}></div>
|
<div
|
||||||
)}
|
onClick={() => {
|
||||||
</div>
|
onChange(gradient);
|
||||||
)
|
}}
|
||||||
|
className={
|
||||||
|
"duration-400 h-12 w-12 cursor-pointer rounded-full transition-all " +
|
||||||
|
gradient +
|
||||||
|
(value === gradient ? " shadow-lg ring-2 ring-primary" : "")
|
||||||
|
}
|
||||||
|
key={idx}
|
||||||
|
></div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -100,12 +100,10 @@ export default function ExtraSidebar(): JSX.Element {
|
||||||
<div className="side-bar-button">
|
<div className="side-bar-button">
|
||||||
{flow && flow.data && (
|
{flow && flow.data && (
|
||||||
<ApiModal flow={flow}>
|
<ApiModal flow={flow}>
|
||||||
<button className={"w-full " + (!isBuilt ? "button-disable" : "")}>
|
<button
|
||||||
<div
|
className={"w-full " + (!isBuilt ? "button-disable" : "")}
|
||||||
className={classNames(
|
|
||||||
"extra-side-bar-buttons"
|
|
||||||
)}
|
|
||||||
>
|
>
|
||||||
|
<div className={classNames("extra-side-bar-buttons")}>
|
||||||
<IconComponent
|
<IconComponent
|
||||||
name="Code2"
|
name="Code2"
|
||||||
className={
|
className={
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,8 @@ export default function ProfileSettingsPage(): JSX.Element {
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (password !== "") await resetPassword(userData!.id, { password });
|
if (password !== "") await resetPassword(userData!.id, { password });
|
||||||
if(gradient !== "") await updateUser(userData!.id, { profile_image: gradient });
|
if (gradient !== "")
|
||||||
|
await updateUser(userData!.id, { profile_image: gradient });
|
||||||
if (gradient !== "") {
|
if (gradient !== "") {
|
||||||
let newUserData = cloneDeep(userData);
|
let newUserData = cloneDeep(userData);
|
||||||
newUserData!.profile_image = gradient;
|
newUserData!.profile_image = gradient;
|
||||||
|
|
@ -52,7 +53,10 @@ export default function ProfileSettingsPage(): JSX.Element {
|
||||||
handleInput({ target: { name: "cnfPassword", value: "" } });
|
handleInput({ target: { name: "cnfPassword", value: "" } });
|
||||||
setSuccessData({ title: "Changes saved successfully!" });
|
setSuccessData({ title: "Changes saved successfully!" });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setErrorData({ title: "Error saving changes", list: [(error as any).response.data.detail] });
|
setErrorData({
|
||||||
|
title: "Error saving changes",
|
||||||
|
list: [(error as any).response.data.detail],
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,12 +84,12 @@ export type changeUser = {
|
||||||
is_superuser?: boolean;
|
is_superuser?: boolean;
|
||||||
password?: string;
|
password?: string;
|
||||||
profile_image?: string;
|
profile_image?: string;
|
||||||
}
|
};
|
||||||
|
|
||||||
export type resetPasswordType = {
|
export type resetPasswordType = {
|
||||||
password?: string;
|
password?: string;
|
||||||
profile_image?: string;
|
profile_image?: string;
|
||||||
}
|
};
|
||||||
|
|
||||||
export type Users = {
|
export type Users = {
|
||||||
id: string;
|
id: string;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue