Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:Settings and download page will change will match dark and light … #2816

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/ui/components/DownloadsManagerView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
IconButton,
SelectLegacy,
} from '@rocket.chat/fuselage';
import { useLocalStorage } from '@rocket.chat/fuselage-hooks';
import { useDarkMode, useLocalStorage } from '@rocket.chat/fuselage-hooks';
import type { ChangeEvent } from 'react';
import { useState, useMemo, useCallback } from 'react';
import { useTranslation } from 'react-i18next';
Expand Down Expand Up @@ -176,13 +176,15 @@
payload: lastSelectedServerUrl,
});
};
const isDark=useDarkMode()

Check failure on line 179 in src/ui/components/DownloadsManagerView/index.tsx

View workflow job for this annotation

GitHub Actions / check (ubuntu-latest)

Replace `=useDarkMode()` with `·=·useDarkMode();`

return (
<Box
display={isVisible ? 'flex' : 'none'}
flexDirection='column'
height='100vh'
backgroundColor='light'
backgroundColor={isDark?'dark':'light'}

Check failure on line 186 in src/ui/components/DownloadsManagerView/index.tsx

View workflow job for this annotation

GitHub Actions / check (ubuntu-latest)

Replace `?'dark':'light'}⏎` with `·?·'dark'·:·'light'}`

>
<Box
minHeight={64}
Expand Down
4 changes: 3 additions & 1 deletion src/ui/components/SettingsView/SettingsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@

import type { RootState } from '../../../store/rootReducer';
import { CertificatesTab } from './CertificatesTab';
import { GeneralTab } from './GeneralTab';

Check failure on line 9 in src/ui/components/SettingsView/SettingsView.tsx

View workflow job for this annotation

GitHub Actions / check (ubuntu-latest)

There should be at least one empty line between import groups
import { useDarkMode } from '@rocket.chat/fuselage-hooks';

Check failure on line 10 in src/ui/components/SettingsView/SettingsView.tsx

View workflow job for this annotation

GitHub Actions / check (ubuntu-latest)

`@rocket.chat/fuselage-hooks` import should occur before import of `react`

export const SettingsView = () => {
const isDark=useDarkMode()

Check failure on line 13 in src/ui/components/SettingsView/SettingsView.tsx

View workflow job for this annotation

GitHub Actions / check (ubuntu-latest)

Replace `=useDarkMode()` with `·=·useDarkMode();`
const isVisible = useSelector(
({ currentView }: RootState) => currentView === 'settings'
);
Expand All @@ -21,7 +23,7 @@
display={isVisible ? 'flex' : 'none'}
flexDirection='column'
height='full'
backgroundColor='light'
backgroundColor={isDark?'dark':'light'}

Check failure on line 26 in src/ui/components/SettingsView/SettingsView.tsx

View workflow job for this annotation

GitHub Actions / check (ubuntu-latest)

Replace `?'dark':` with `·?·'dark'·:·`
>
<Box
width='full'
Expand Down
Loading