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

[C] update React #477

Merged
merged 1 commit into from
Jun 20, 2024
Merged
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: 1 addition & 5 deletions components/global/Header/Navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import NavItemWithChildren from "./NavItemWithChildren";
export default function Navigation({
items,
userProfilePage,
theme,
theme = "desktop",
desktopSetter,
mobileActive,
mobileSetter,
Expand Down Expand Up @@ -167,7 +167,3 @@ Navigation.propTypes = {
mobileActive: PropTypes.bool,
mobileSetter: PropTypes.func,
};

Navigation.defaultProps = {
theme: "desktop",
};
13 changes: 7 additions & 6 deletions components/page/Breadcrumbs/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import PropTypes from "prop-types";
import Link from "next/link";
import internalLinkShape from "@/shapes/link";
import * as Styled from "./styles";

Expand All @@ -8,11 +7,13 @@ export default function Breadcrumbs({ breadcrumbs, type }) {

return (
<Styled.Breadcrumbs breadcrumbs={breadcrumbs} $type={type}>
{({ id, uri, title, ...restProps }) => (
<Link legacyBehavior prefetch={false} href={`/${uri}`} passHref>
<Styled.Link {...restProps}>{title}</Styled.Link>
</Link>
)}
{({ id, uri, title, ...restProps }) => {
return (
<Styled.Link prefetch={false} href={`/${uri}`} {...restProps}>
{title}
</Styled.Link>
);
}}
</Styled.Breadcrumbs>
);
}
Expand Down
3 changes: 2 additions & 1 deletion components/page/Breadcrumbs/styles.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import styled from "styled-components";
import BaseLink from "next/link";
import CommonJsBreadcrumbs from "@castiron/components-breadcrumbs";
import { containerRegular, respond, tokens } from "@/styles/globalStyles";

Expand Down Expand Up @@ -66,7 +67,7 @@ export const Breadcrumbs = styled(BreadcrumbsWrapper)`
}
`;

export const Link = styled.a`
export const Link = styled(BaseLink)`
display: block;
padding-right: 1em;
padding-left: 1em;
Expand Down
1 change: 0 additions & 1 deletion components/templates/EventPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export default function EventPage({
id,
uri,
title,
active: true,
};
// logic for displaying city/state in US, city/country outside
const location = `${address ? address + "," : ""} ${createLocationString(
Expand Down
1 change: 0 additions & 1 deletion components/templates/GalleryPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export default function GalleryPage({
id,
uri,
title,
active: true,
};

const image = featuredImage[0];
Expand Down
1 change: 0 additions & 1 deletion components/templates/GlossaryPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export default function GlossaryPage({ data }) {
id,
uri,
title,
active: true,
};

return (
Expand Down
1 change: 0 additions & 1 deletion components/templates/NewsPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export default function NewsPage({ data }) {
id,
uri,
title,
active: true,
};
const manualAssets = [];
const heroBlock =
Expand Down
1 change: 0 additions & 1 deletion components/templates/Page/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export default function Page({
id,
uri,
title,
active: true,
};

// add FilterBar to dynamic pages
Expand Down
1 change: 0 additions & 1 deletion components/templates/SearchPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export default function SearchPage({
id,
uri,
title,
active: true,
};
const { query } = usePathData();
const keyphrase =
Expand Down
1 change: 0 additions & 1 deletion components/templates/SlideshowPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export default function SlideshowPage({
id,
uri,
title,
active: true,
};

// prepend main slide to content slides
Expand Down
1 change: 0 additions & 1 deletion components/templates/StaffPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default function StaffPage({
id,
uri,
title,
active: true,
};
const breadcrumbs = [parentEntry, pageLink].filter(Boolean);

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"**/styles.js": "yarn fix:styled"
},
"dependencies": {
"@castiron/components-breadcrumbs": "^1.1.0",
"@castiron/components-breadcrumbs": "2.0.2",
"@castiron/style-mixins": "^1.0.6",
"@headlessui/react": "^1.6.6",
"@influxdata/influxdb-client": "^1.33.2",
Expand All @@ -78,8 +78,8 @@
"next": "^14.2.3",
"next-build-id": "^3.0.0",
"npm-run-all": "^4.1.5",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.33.1",
"react-i18next": "^12.0.0",
"react-is": "^18.2.0",
Expand Down
62 changes: 17 additions & 45 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1307,13 +1307,10 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@castiron/components-breadcrumbs@^1.1.0":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@castiron/components-breadcrumbs/-/components-breadcrumbs-1.1.1.tgz#47b807fcbde70a4b97df86f420a9cc87dfae2dc2"
integrity sha512-Co/ekL48nalttIAY262CgLFtr1hI4KJ0XZsoT/FQEbMag7zKlkKgK9u5gOK9Vi14u7I9WYb1fziERl2Sw8LYeg==
dependencies:
react "^17.0.1"
react-dom "^17.0.1"
"@castiron/[email protected]":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@castiron/components-breadcrumbs/-/components-breadcrumbs-2.0.2.tgz#62f4298090bc35cca2832e582e2f97f75e347459"
integrity sha512-VrKD3qvlGU4erPoGQ1Dj50KzLFEyDKvD+VsxTAie/yjI/HR5n3x2ipRjuKqslmZHp6D8vbmZJXmvzQBySVlpCA==

"@castiron/style-mixins@^1.0.6":
version "1.0.7"
Expand Down Expand Up @@ -9422,22 +9419,13 @@ react-docgen@^5.0.0:
node-dir "^0.1.10"
strip-indent "^3.0.0"

react-dom@18.2.0:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d"
integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==
react-dom@^18.3.1:
version "18.3.1"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4"
integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==
dependencies:
loose-envify "^1.1.0"
scheduler "^0.23.0"

react-dom@^17.0.1:
version "17.0.2"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23"
integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
scheduler "^0.20.2"
scheduler "^0.23.2"

react-element-to-jsx-string@^15.0.0:
version "15.0.0"
Expand Down Expand Up @@ -9539,20 +9527,12 @@ react-uid@^2.3.2:
dependencies:
tslib "^2.0.0"

[email protected]:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==
dependencies:
loose-envify "^1.1.0"

react@^17.0.1:
version "17.0.2"
resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==
react@^18.3.1:
version "18.3.1"
resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891"
integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"

read-pkg-up@^7.0.1:
version "7.0.1"
Expand Down Expand Up @@ -9982,18 +9962,10 @@ sax@^1.2.4:
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==

scheduler@^0.20.2:
version "0.20.2"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91"
integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"

scheduler@^0.23.0:
version "0.23.0"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe"
integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==
scheduler@^0.23.2:
version "0.23.2"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.2.tgz#414ba64a3b282892e944cf2108ecc078d115cdc3"
integrity sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==
dependencies:
loose-envify "^1.1.0"

Expand Down
Loading