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

chore: change banner to use website and remove use of Buffer #1182

Merged
merged 2 commits into from
Aug 29, 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
9 changes: 7 additions & 2 deletions src/components/AnnouncementRemote.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const AnnouncementBanner = ({
)}
</div>
<button
className="absolute right-0 top-0 flex h-full w-10 items-center justify-center p-4 text-white"
className="absolute right-0 top-0 flex h-full items-center justify-center p-4 text-white"
data-testid="app-announcement-close"
onClick={() => {
setVisible(false)
Expand All @@ -117,7 +117,12 @@ export const AnnouncementBanner = ({

export const IconCross = ({ size = 16 }: { size: number }) => {
return (
<svg width={size} height={size} viewBox="0 0 16 16">
<svg
width={size}
height={size}
viewBox="0 0 16 16"
className="fill-current"
>
<path d="M13.3745 3.37476L3.37453 13.3748L2.625 12.6252L12.625 2.62523L13.3745 3.37476Z" />
<path d="M3.37453 2.62523L13.3745 12.6252L12.625 13.3748L2.625 3.37476L3.37453 2.62523Z" />
</svg>
Expand Down
7 changes: 6 additions & 1 deletion src/components/ExternalLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ ExternalLink.displayName = 'ExternalLink'

export const IconOpenExternal = ({ size = 24 }: { size: number }) => {
return (
<svg width={size} height={size} viewBox="0 0 16 16">
<svg
width={size}
height={size}
viewBox="0 0 16 16"
className="fill-current"
>
<path d="M10.9605 4.28998H3.76002V3.22998H12.77V12.24H11.71V5.03952L4.13479 12.6148L3.38525 11.8652L10.9605 4.28998Z" />
</svg>
)
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const Layout = ({ children, stickyHeader = true }) => {
</GeorestrictedContext.Consumer>
<div>
<AnnouncementBanner
app="wallet"
app="website"
configUrl={process.env.GATSBY_ANNOUNCEMENTS_CONFIG_URL}
/>
{children}
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/use-announcement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type State = {
error: null | string
}

const checksum = (data: object) => sha256(Buffer.from(JSON.stringify(data)))
const checksum = (data: object) => JSON.stringify(data)

export const useDismissedAnnouncement = (): [
string | null | undefined,
Expand Down
Loading