Skip to content

Commit

Permalink
Merge pull request #1302 from ral-facilities/renovate/prettier-3.x
Browse files Browse the repository at this point in the history
Update dependency prettier to v3
  • Loading branch information
kaperoo authored Feb 23, 2024
2 parents f8c77ab + 62c6512 commit 6949faf
Show file tree
Hide file tree
Showing 6 changed files with 1,632 additions and 1,603 deletions.
4 changes: 4 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
compressionLevel: mixed

enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.1.0.cjs
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"cypress-failed-log": "2.10.0",
"eslint-config-prettier": "8.10.0",
"eslint-plugin-cypress": "2.15.1",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-prettier": "5.1.3",
"express": "4.18.1",
"husky": "9.0.6",
"i18next": "23.8.2",
Expand All @@ -34,7 +34,7 @@
"js-cookie": "3.0.1",
"jsonwebtoken": "9.0.0",
"loglevel": "1.9.1",
"prettier": "2.8.0",
"prettier": "3.2.5",
"prop-types": "15.8.1",
"query-string": "7.1.1",
"react": "17.0.2",
Expand Down
37 changes: 20 additions & 17 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,27 @@ class App extends React.Component<WithTranslation> {
public componentDidMount(): void {
// Check for changes in maintenance state. Ensures that state changes are
// loaded when a user does not reload the site for longer than 5 minutes.
setInterval(() => {
const provider = getState().scigateway.authorisation.provider;
if (provider.fetchMaintenanceState) {
const storedMaintenanceState = getState().scigateway.maintenance;
provider.fetchMaintenanceState().then((fetchedMaintenanceState) => {
if (
storedMaintenanceState.show !== fetchedMaintenanceState.show ||
storedMaintenanceState.message !== fetchedMaintenanceState.message
) {
dispatch(loadMaintenanceState(fetchedMaintenanceState));
setInterval(
() => {
const provider = getState().scigateway.authorisation.provider;
if (provider.fetchMaintenanceState) {
const storedMaintenanceState = getState().scigateway.maintenance;
provider.fetchMaintenanceState().then((fetchedMaintenanceState) => {
if (
storedMaintenanceState.show !== fetchedMaintenanceState.show ||
storedMaintenanceState.message !== fetchedMaintenanceState.message
) {
dispatch(loadMaintenanceState(fetchedMaintenanceState));

// Reload the page if maintenance state changes from true to false
if (storedMaintenanceState.show && !fetchedMaintenanceState.show)
window.location.reload();
}
});
}
}, 1000 * 60 * 5);
// Reload the page if maintenance state changes from true to false
if (storedMaintenanceState.show && !fetchedMaintenanceState.show)
window.location.reload();
}
});
}
},
1000 * 60 * 5
);
}

public render(): React.ReactElement {
Expand Down
4 changes: 2 additions & 2 deletions src/homePage/homePage.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ const BrowseDecal = styled('div', {
theme.palette.mode === 'light'
? `url(${decal2Image})`
: theme.colours.type === 'default'
? `url(${decal2DarkImage})`
: `url(${decal2DarkHCImage})`,
? `url(${decal2DarkImage})`
: `url(${decal2DarkHCImage})`,
backgroundRepeat: 'no-repeat',
backgroundPosition: 'top left',
backgroundSize: 'auto 100%',
Expand Down
4 changes: 2 additions & 2 deletions src/theming.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ export const buildTheme = (
? DARK_MODE_HIGH_CONTRAST_COLOURS
: DARK_MODE_COLOURS
: highContrastModePreference
? LIGHT_MODE_HIGH_CONTRAST_COLOURS
: LIGHT_MODE_COLOURS;
? LIGHT_MODE_HIGH_CONTRAST_COLOURS
: LIGHT_MODE_COLOURS;

if (primaryColour && !(darkModePreference && highContrastModePreference)) {
colours.primary = primaryColour;
Expand Down
Loading

0 comments on commit 6949faf

Please sign in to comment.