diff --git a/pages/[user]/book.tsx b/pages/[user]/book.tsx
index cd6fc072..36cac26c 100644
--- a/pages/[user]/book.tsx
+++ b/pages/[user]/book.tsx
@@ -218,7 +218,9 @@ export default function Book(props: any): JSX.Element {
{locations.length > 1 && (
- Location
+
+ Location
+
{locations.map((location) => (
))}
diff --git a/pages/settings/profile.tsx b/pages/settings/profile.tsx
index b4f49410..30842c7b 100644
--- a/pages/settings/profile.tsx
+++ b/pages/settings/profile.tsx
@@ -12,6 +12,11 @@ import TimezoneSelect from "react-timezone-select";
import { UsernameInput } from "../../components/ui/UsernameInput";
import ErrorAlert from "../../components/ui/alerts/Error";
+const themeOptions = [
+ { value: "light", label: "Light" },
+ { value: "dark", label: "Dark" },
+];
+
export default function Settings(props) {
const [successModalOpen, setSuccessModalOpen] = useState(false);
const usernameRef = useRef();
@@ -19,18 +24,13 @@ export default function Settings(props) {
const descriptionRef = useRef();
const avatarRef = useRef();
const hideBrandingRef = useRef();
- const [selectedTheme, setSelectedTheme] = useState({ value: "" });
+ const [selectedTheme, setSelectedTheme] = useState({ value: props.user.theme });
const [selectedTimeZone, setSelectedTimeZone] = useState({ value: props.user.timeZone });
- const [selectedWeekStartDay, setSelectedWeekStartDay] = useState({ value: "" });
+ const [selectedWeekStartDay, setSelectedWeekStartDay] = useState({ value: props.user.weekStart });
const [hasErrors, setHasErrors] = useState(false);
const [errorMessage, setErrorMessage] = useState("");
- const themeOptions = [
- { value: "light", label: "Light" },
- { value: "dark", label: "Dark" },
- ];
-
useEffect(() => {
setSelectedTheme(
props.user.theme ? themeOptions.find((theme) => theme.value === props.user.theme) : null
@@ -179,6 +179,7 @@ export default function Settings(props) {
id="theme"
isDisabled={!selectedTheme}
defaultValue={selectedTheme || themeOptions[0]}
+ value={selectedTheme || themeOptions[0]}
onChange={setSelectedTheme}
className="shadow-sm focus:ring-neutral-500 focus:border-neutral-500 mt-1 block w-full sm:text-sm border-gray-300 rounded-sm"
options={themeOptions}