Updated Dash

This commit is contained in:
The-Yearly 2025-05-16 17:41:29 +05:30
parent 0a8d80196f
commit ac7ed553ab
3 changed files with 3 additions and 8 deletions

View file

@ -55,12 +55,7 @@ export function DashboardEdit({ teamId }: { teamId: string }) {
const orderedWebsites = [...ordered];
const [removed] = orderedWebsites.splice(source.index, 1);
orderedWebsites.splice(destination.index, 0, removed);
setOrder(
orderedWebsites
.map(website => website?.id)
.filter((id): id is string => typeof id === 'string'),
);
setOrder(orderedWebsites.filter(website => website?.id).map(website => website.id));
setEdited(true);
}
function handleActiveWebsites(id: string) {

View file

@ -49,7 +49,7 @@ export function DashboardPage() {
<>
{editing && <DashboardEdit teamId={teamId} />}
{!editing &&
(websiteActive.length != 0 ? (
(websiteActive.length !== 0 ? (
<>
<WebsiteChartList
websites={result?.data as any}

View file

@ -390,7 +390,7 @@ export const messages = defineMessages({
},
noWebsitesToggled: {
id: 'message.no-websites-toggled',
defaultMessage: 'You have not toggled any websites',
defaultMessage: 'You have not toggled any websites.',
},
noTeamWebsites: {