Skip to content

Commit

Permalink
chore: minor changes per lighthouse checks
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanoshadjipetrou committed Nov 20, 2024
1 parent c175229 commit 67c2c02
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 32 deletions.
7 changes: 7 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<link
rel="preload"
fetchpriority="high"
as="image"
href="/static/dataset-detail.webp"
type="image/webp"
/>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<title>Dataxplorer, empowering the impact of data</title>
Expand Down
Binary file added public/static/dataset-detail.webp
Binary file not shown.
Binary file removed public/static/fundportfoliomanager.png
Binary file not shown.
1 change: 1 addition & 0 deletions src/app/modules/common/newsletterForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export default function NewsletterForm(
ref={inputRef}
onFocus={inputRefFocus}
onBlur={inputRefBlur}
autoComplete="email"
/>
<button type="submit">SUBSCRIBE</button>
</form>
Expand Down
2 changes: 2 additions & 0 deletions src/app/modules/home-module/components/Filter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ export default function Filter(
onChange={handleSearch}
data-cy="filter-search-input"
aria-label="search"
name="search"
autoComplete="search"
/>
<IconButton
onClick={() => {
Expand Down
30 changes: 22 additions & 8 deletions src/app/modules/home-module/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,13 @@ import { useRecoilState } from "recoil";
import { Box, Grid, Container } from "@material-ui/core";
/* project */
import HomeFooter from "app/modules/home-module/components/Footer";
import DatasetDetailImage from "app/modules/home-module/assets/dataset-detail.png";
import { ReactComponent as GoogleIcon } from "app/modules/onboarding-module/asset/google-img.svg";
import { ReactComponent as LinkedInIcon } from "app/modules/onboarding-module/asset/linkedIn-img.svg";
import { ReactComponent as MicrosoftIcon } from "app/modules/onboarding-module/asset/microsoft-img.svg";
import HeroEllipses from "app/modules/home-module/assets/hero-ellipses.svg";

import { homeDisplayAtom } from "app/state/recoil/atoms";
import {
datsetDetailImgcss,
rowFlexCss,
turnsDataCss,
} from "app/modules/home-module/style";
import { rowFlexCss, turnsDataCss } from "app/modules/home-module/style";
import AssetsCollection from "./components/AssetCollection";

export default function HomeModule() {
Expand Down Expand Up @@ -177,12 +172,31 @@ export default function HomeModule() {
@media screen and (max-width: 1290px) {
justify-content: center;
}
@media (max-width: 1240px) {
> img {
width: 70%;
height: 100%;
object-fit: contain;
}
}
@media (max-width: 700px) {
> img {
width: 95%;
height: 100%;
object-fit: contain;
}
}
`}
>
<img
src={DatasetDetailImage}
width={710}
height={428}
fetchPriority="high"
alt="dataset-detail-img"
css={datsetDetailImgcss}
src="/static/dataset-detail.webp"
style={{
borderRadius: "14px",
}}
/>
</Grid>
</Grid>
Expand Down
16 changes: 0 additions & 16 deletions src/app/modules/home-module/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,6 @@ export const featuredAssetsCss = css`
}
`;

export const datsetDetailImgcss = css`
width: 710px;
height: 428px;
border-radius: 14px;
@media (max-width: 1240px) {
width: 70%;
object-fit: contain;
height: 100%;
}
@media (max-width: 700px) {
width: 95%;
object-fit: contain;
height: 100%;
}
`;

export const rowFlexCss = css`
display: flex;
justify-content: center;
Expand Down
24 changes: 16 additions & 8 deletions src/react-app-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,38 @@

declare namespace NodeJS {
interface ProcessEnv {
readonly NODE_ENV: 'development' | 'production' | 'test';
readonly NODE_ENV: "development" | "production" | "test";
readonly PUBLIC_URL: string;
}
}

declare module '*.gif' {
declare module "*.gif" {
const src: string;
export default src;
}

declare module '*.jpg' {
declare module "*.jpg" {
const src: string;
export default src;
}

declare module '*.jpeg' {
declare module "*.jpeg" {
const src: string;
export default src;
}

declare module '*.png' {
declare module "*.png" {
const src: string;
export default src;
}

declare module '*.webp' {
declare module "*.webp" {
const src: string;
export default src;
}

declare module '*.svg' {
import * as React from 'react';
declare module "*.svg" {
import * as React from "react";

export const ReactComponent: React.FunctionComponent<
React.SVGProps<SVGSVGElement>
Expand All @@ -45,3 +45,11 @@ declare module '*.svg' {
const src: string;
export default src;
}

declare module "react" {
import React from "react";

interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
fetchPriority?: "high" | "low" | "auto";
}
}

0 comments on commit 67c2c02

Please sign in to comment.