-
Notifications
You must be signed in to change notification settings - Fork 20
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
Pressroom about #297
Conversation
Branch preview✅ Deployed successfully in branch deployment: |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
a2ad56d
to
1d8ba8f
Compare
public/images/great-than.svg
Outdated
@@ -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"/> |
There was a problem hiding this comment.
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.
public/images/less-than.svg
Outdated
@@ -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"/> |
There was a problem hiding this comment.
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'}` |
There was a problem hiding this comment.
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 }}> |
There was a problem hiding this comment.
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) => { |
There was a problem hiding this comment.
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.
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> | ||
) |
There was a problem hiding this comment.
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' }}> |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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' }}> |
There was a problem hiding this comment.
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]) |
There was a problem hiding this comment.
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.
const STEPS_PER_DOT = useMemo(() => (isSmallScreen ? 1 : 3), [isSmallScreen]) | |
const stepsPerDot = useMemo(() => (isSmallScreen ? STEPS_PER_DOT_SM : STEPS_PER_DOT_LG), [isSmallScreen]) |
Co-authored-by: Aaron Cook <[email protected]>
Implements the remaining sections of the Pressroom
Figma https://www.figma.com/file/zNUgOvD1WcFankfXfBiAfs/Press-room?type=design&node-id=9929-4249&mode=design&t=W7LHmouFpLwvwqpW-0