Skip to content

Commit

Permalink
refactor: address feedback
Browse files Browse the repository at this point in the history
1. Remove descriptionTitle error
2. change embed fallback value to `undefined`
3. remove `purpose`
4. change type from `HTMLElement`
  • Loading branch information
prachigarg19 committed Nov 1, 2023
1 parent fe5c071 commit 7966f46
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/features/projects/components/ProjectSnippet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function ProjectSnippet({
const url = getDonationUrl(
project.slug,
token,
embed || 'false',
embed || undefined,
callbackUrl || undefined
);
embed === 'true' ? window.open(url, '_top') : (window.location.href = url);
Expand Down
5 changes: 0 additions & 5 deletions src/features/projects/components/projects/Filters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ export default function Filters(): ReactElement {
const { projects, setFilteredProjects, filtersOpen, setFilterOpen } =
useProjectProps();

const purpose = {
restoration: true,
conservation: true,
};

const [type, setType] = React.useState<Record<string, boolean>>({
'natural-regeneration': true,
'managed-regeneration': true,
Expand Down
2 changes: 1 addition & 1 deletion src/tenants/common/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface Props {
export default function About({ leaderboard, tenantScore }: Props) {
const { t, ready } = useTranslation(['tenants']);

const descriptionRef = React.useRef<HTMLElement>(null);
const descriptionRef = React.useRef<HTMLParagraphElement>(null);
React.useEffect(() => {
if (descriptionRef.current !== null) {
descriptionRef.current.innerHTML = t(
Expand Down
1 change: 1 addition & 0 deletions tenant.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ interface ConfigType {
manifest?: string;
home?: {
image: string;
descriptionTitle?: string;
};
}

Expand Down

0 comments on commit 7966f46

Please sign in to comment.