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

Pressroom about #297

Merged
merged 22 commits into from
Apr 2, 2024
Merged

Pressroom about #297

merged 22 commits into from
Apr 2, 2024

Conversation

DiogoSoaress
Copy link
Member

Copy link

github-actions bot commented Mar 27, 2024

Branch preview

✅ Deployed successfully in branch deployment:

https://pressroom_about--homepage.review.5afe.dev

Copy link

github-actions bot commented Mar 27, 2024

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@DiogoSoaress DiogoSoaress changed the base branch from main to pressroom-releases March 28, 2024 15:28
@@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.15845 6.17415C9.36972 5.94195 9.71225 5.94195 9.92352 6.17415L14.8415 11.5796C15.0528 11.8118 15.0528 12.1882 14.8415 12.4204L9.92351 17.8258C9.71225 18.0581 9.36972 18.0581 9.15845 17.8258C8.94718 17.5936 8.94718 17.2172 9.15845 16.985L13.6939 12L9.15845 7.01504C8.94718 6.78283 8.94718 6.40636 9.15845 6.17415Z" fill="#12FF80" stroke="#12FF80" stroke-linecap="round" stroke-linejoin="round"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest setting the fill and stroke to be "currentColor" and assigning the colour in situ instead.

@@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.8415 17.8258C14.6303 18.0581 14.2878 18.0581 14.0765 17.8258L9.15845 12.4204C8.94718 12.1882 8.94718 11.8118 9.15845 11.5796L14.0765 6.17415C14.2878 5.94195 14.6303 5.94195 14.8416 6.17415C15.0528 6.40636 15.0528 6.78283 14.8416 7.01504L10.3061 12L14.8415 16.985C15.0528 17.2172 15.0528 17.5936 14.8415 17.8258Z" fill="#12FF80" stroke="#12FF80" stroke-linecap="round" stroke-linejoin="round"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above regarding fill and stroke values.

const TOTAL_ASSETS_STORED = 'https://dune.com/queries/2893829/4821383'

const AboutUs = ({ totalAssets }: { totalAssets: number }) => {
const totalAssetsStr = `~$${totalAssets ? formatValue(totalAssets) : '120B'}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: let's move "120B" to a constant.

)

return (
<Box mt="140px" id={PressroomAnchors.ABOUT_US.slice(1)} width={{ xs: '100%', md: 9 / 12 }}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest changing PressroomAnchors to something like PressroomIds as that what they inherently are. You can then add the hash inline. What do you think?

]

const ContentsNavigation = () => {
const handleContentTableClick = (e: React.MouseEvent<HTMLAnchorElement>, target: string) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can get the target from the event.

Comment on lines +9 to +19
const VideoCard = ({ title, url }: { title?: string; url: string }) => (
<div className={css.card}>
<MediaPlayer url={url} />
<div className={css.cardBody}>
{title ? <Typography variant="h3">{title}</Typography> : null}
<SafeLink href={url}>
<LinkButton>Watch now</LinkButton>
</SafeLink>
</div>
)
}
</div>
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future, I'd suggest doing things like this in a seperate PR as it's unrelated (I almost missed the change below). No need to change it back.


type NewsProps = { news: Entry<TypeExternalUrlSkeleton, undefined, string>[] }

export const News = ({ news }: NewsProps) => (
<>
<Typography variant="h2" textAlign="center" mt={{ xs: '80px', md: '200px' }}>
<Box id={PressroomAnchors.SAFE_IN_THE_NEWS.slice(1)} mt={{ xs: '80px', md: '140px' }}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As before regarding changing anchors to ids.


const categories = ['Safe{Core}', 'Safe{Wallet}', 'Safe{DAO}', 'Ecosystem', 'Institutional', 'Internal']

const PAGE_LENGTH = 4

const PressReleases = ({ allPosts }: { allPosts: BlogPostEntry[] }) => {
const router = useRouter()
const selectedCategory = router.query.category
const selectedTag = router.query.category as string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use the getPage helper here instead of casting.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I address this refactor in other PR? I will leave a comment

<Typography variant="h2" mt={{ xs: '80px', md: '200px' }}>
Press releases
</Typography>
<Box id={PressroomAnchors.PRESS_RELEASES.slice(1)} mt={{ xs: '80px', md: '250px' }}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As before regarding changing anchors to ids.

const Timeline = ({ items }: TimelineProps) => {
const [activeStep, setActiveStep] = useState(0)
const isSmallScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm'))
const STEPS_PER_DOT = useMemo(() => (isSmallScreen ? 1 : 3), [isSmallScreen])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to mark this as a constant, I'd move the values to the top of the file and use them here, e.g.

Suggested change
const STEPS_PER_DOT = useMemo(() => (isSmallScreen ? 1 : 3), [isSmallScreen])
const stepsPerDot = useMemo(() => (isSmallScreen ? STEPS_PER_DOT_SM : STEPS_PER_DOT_LG), [isSmallScreen])

Base automatically changed from pressroom-releases to main April 2, 2024 13:59
@DiogoSoaress DiogoSoaress requested a review from iamacook April 2, 2024 15:32
@DiogoSoaress DiogoSoaress requested a review from iamacook April 2, 2024 16:21
@DiogoSoaress DiogoSoaress merged commit c475ee2 into main Apr 2, 2024
5 checks passed
@DiogoSoaress DiogoSoaress deleted the pressroom-about branch April 2, 2024 16:49
@github-actions github-actions bot locked and limited conversation to collaborators Apr 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants