feat: add empty state and polish trending column

This commit is contained in:
2024-04-13 08:30:58 +07:00
parent 35cf0abda4
commit a14aeaeb55
19 changed files with 505 additions and 456 deletions

View File

@@ -7,13 +7,18 @@ import { useTranslation } from "react-i18next";
import { toast } from "sonner";
import * as Checkbox from "@radix-ui/react-checkbox";
import { CheckIcon } from "@lume/icons";
import { AppRouteSearch } from "@lume/types";
export const Route = createFileRoute("/auth/new/backup")({
validateSearch: (search: Record<string, string>): AppRouteSearch => {
return {
account: search.account,
};
},
component: Screen,
});
function Screen() {
// @ts-ignore, magic!!!
const { account } = Route.useSearch();
const { t } = useTranslation();
@@ -32,7 +37,7 @@ function Screen() {
} else {
return navigate({
to: "/auth/settings",
search: { account, new: true },
search: { account },
});
}
}

View File

@@ -42,28 +42,28 @@ function Screen() {
await requestPermission();
setNewSettings((prev) => ({
...prev,
notification: !settings.notification,
notification: !newSettings.notification,
}));
};
const toggleAutoUpdate = () => {
setNewSettings((prev) => ({
...prev,
autoUpdate: !settings.autoUpdate,
autoUpdate: !newSettings.autoUpdate,
}));
};
const toggleEnhancedPrivacy = () => {
setNewSettings((prev) => ({
...prev,
enhancedPrivacy: !settings.enhancedPrivacy,
enhancedPrivacy: !newSettings.enhancedPrivacy,
}));
};
const toggleZap = () => {
setNewSettings((prev) => ({
...prev,
zap: !settings.zap,
zap: !newSettings.zap,
}));
};