Skip to content

Commit

Permalink
refactor(settings): rename 'client' to 'user' because that makes more…
Browse files Browse the repository at this point in the history
… sense
  • Loading branch information
insertish committed Jun 26, 2024
1 parent 741df7d commit bfa390e
Show file tree
Hide file tree
Showing 19 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/client/components/app/interface/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Accessor, JSX } from "solid-js";

import { Settings, SettingsProps } from "./Settings";
import channel from "./channel";
import client from "./client";
import server from "./server";
import user from "./user";

export { Settings } from "./Settings";

Expand Down Expand Up @@ -61,7 +61,7 @@ export const SettingsConfigurations: Record<
string,
SettingsConfiguration<never>
> = {
client,
user,
server,
channel,
};
Expand Down
2 changes: 1 addition & 1 deletion packages/client/components/modal/modals/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const SettingsModal: PropGenerator<"settings"> = ({
config: configKey,
context,
}) => {
const config = SettingsConfigurations[configKey ?? "client"];
const config = SettingsConfigurations[configKey];

return {
_children: (props) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/Interface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Interface = (props: { children: JSX.Element }) => {
e.preventDefault();
modalController.push({
type: "settings",
config: "client",
config: "user",
});
} else if (typeof e.to === "string") {
state.layout.setLastActivePath(e.to);
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function PWARedirect() {
* Open settings and redirect to last active path
*/
function SettingsRedirect() {
onMount(() => modalController.push({ type: "settings", config: "client" }));
onMount(() => modalController.push({ type: "settings", config: "user" }));
return <PWARedirect />;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/interface/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export function HomePage() {
</CategoryButton>
<CategoryButton
onClick={() =>
modalController.push({ type: "settings", config: "client" })
modalController.push({ type: "settings", config: "user" })
}
description={t("app.home.settings-tooltip")}
icon={<BiSolidCog size={24} />}
Expand Down

0 comments on commit bfa390e

Please sign in to comment.