Skip to content

Commit

Permalink
Fix static rendering
Browse files Browse the repository at this point in the history
Remove protected pages component and use effects instead
  • Loading branch information
255kb committed Jun 26, 2023
1 parent 8905399 commit cd89d55
Show file tree
Hide file tree
Showing 104 changed files with 22,643 additions and 1,894 deletions.
12 changes: 6 additions & 6 deletions components/account-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ const AccountMenu: FunctionComponent = function () {
router.pathname.includes('account/info') ? 'active' : ''
}`}
>
<Link href='/account/info/'>
<a className='list-link text-reset'>General</a>
<Link href='/account/info/' className='list-link text-reset'>
General
</Link>
</li>
<li
className={`list-item ${
router.pathname.includes('account/subscription') ? 'active' : ''
}`}
>
<Link href='/account/subscription/'>
<a className='list-link text-reset'>Subscription</a>
<Link href='/account/subscription/' className='list-link text-reset'>
Subscription
</Link>
</li>
{!isLoading &&
Expand All @@ -38,8 +38,8 @@ const AccountMenu: FunctionComponent = function () {
router.pathname.includes('account/users') ? 'active' : ''
}`}
>
<Link href='/account/users/'>
<a className='list-link text-reset'>Users</a>
<Link href='/account/users/' className='list-link text-reset'>
Users
</Link>
</li>
)}
Expand Down
36 changes: 17 additions & 19 deletions components/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,25 +78,23 @@ const Card: FunctionComponent<{
{props.data.links.map((link, linkIndex) => {
return !link.src.includes('mockoon://') &&
!link.src.includes('clipboardcopy://') ? (
<Link key={`link${linkIndex}`} href={link.src}>
<a
className={`btn-xs btn btn-primary-soft d-flex align-items-center ${
props.data.links?.length > 1 ? '' : 'mt-auto'
}`}
style={{
color: synchronizedColors
? props.borderColor
: undefined
}}
target={link.blank ? '_blank' : undefined}
>
{link.icon && (
<span className='icon me-2'>
<i className={link.icon}></i>
</span>
)}
{link.text}
</a>
<Link
key={`link${linkIndex}`}
href={link.src}
className={`btn-xs btn btn-primary-soft d-flex align-items-center ${
props.data.links?.length > 1 ? '' : 'mt-auto'
}`}
style={{
color: synchronizedColors ? props.borderColor : undefined
}}
target={link.blank ? '_blank' : undefined}
>
{link.icon && (
<span className='icon me-2'>
<i className={link.icon}></i>
</span>
)}
{link.text}
</Link>
) : (
<a
Expand Down
6 changes: 2 additions & 4 deletions components/contact-banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ const ContactBanner: FunctionComponent<{}> = function (props) {
</h4>
</div>
<div className='col-12 col-lg-3 d-flex justify-content-end'>
<Link href='/contact/'>
<a className='col-12 btn btn-primary-soft'>
<span> Contact us</span>
</a>
<Link href='/contact/' className='col-12 btn btn-primary-soft'>
<span> Contact us</span>
</Link>
</div>
</div>
Expand Down
10 changes: 4 additions & 6 deletions components/download-cta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ const DownloadCTA: FunctionComponent = function () {
</div>

<div className='col-12 col-lg-3'>
<Link href='/download/'>
<a className='col-12 btn btn-primary-soft'>
<span>
<i className='icon-download'></i> Download
</span>
</a>
<Link href='/download/' className='col-12 btn btn-primary-soft'>
<span>
<i className='icon-download'></i> Download
</span>
</Link>
</div>
</div>
Expand Down
Loading

0 comments on commit cd89d55

Please sign in to comment.