Skip to content

Commit 38a1e6b

Browse files
committed
Merge branch 'main' into dev
2 parents a8e8535 + 2056be3 commit 38a1e6b

31 files changed

+386
-174
lines changed

components/Docs/CodeHighlighting.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const CodePanel = ({ annotation, children, ...props }: React.PropsWithChildren<I
7777
export const CodeHighlighting: React.FunctionComponent<ICodeHighlightingProps> = ({ className, children, ...props }: React.PropsWithChildren<ICodeHighlightingProps>) => {
7878
const [code, setCode] = React.useState('');
7979

80-
const fetchHighlighter = async (className: string, children: React.ReactNode) => {
80+
const fetchHighlighter = React.useCallback(async (className: string, children: React.ReactNode) => {
8181
const language = className.split('-')[1];
8282
const highlighter = await ShikiService.getHighlighter();
8383

@@ -99,13 +99,13 @@ export const CodeHighlighting: React.FunctionComponent<ICodeHighlightingProps> =
9999

100100
return;
101101
}
102-
};
102+
}, []);
103103

104104
React.useEffect(() => {
105105
if (className && children) {
106106
fetchHighlighter(className, children);
107107
}
108-
}, [className, children]);
108+
}, [className, children, fetchHighlighter]);
109109

110110
const getLanguage = (className: string) => {
111111
const language = className.split('-')[1];

components/Docs/NavGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const NavGroup: React.FunctionComponent<INavGroupProps> = ({
5050
))}
5151
</ul>
5252
);
53-
}, [item, items, router.asPath]);
53+
}, [item, items]);
5454

5555
return (
5656
<Section

components/Docs/PageInfo.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ export const PageInfo: React.FunctionComponent<IPageInfoProps> = ({ page, items
4646
{(prevPage && prevPage.slug && prevPage.title) && (
4747
<a href={`/docs/${(prevPage as PageFrontMatter).slug}`}
4848
title={prevPage.title}
49-
className={`border border-vulcan-100 hover:border-teal-900 rounded-sm w-1/2 p-4 items-start flex flex-col gap-2 text-teal-500 hover:text-teal-900`}>
49+
className={`border border-vulcan-100 hover:border-teal-900 rounded w-1/2 p-4 items-start flex flex-col gap-2 text-teal-500 hover:text-teal-900`}>
5050
<span className="text-base text-whisper-500">Previous</span>
5151
<span>&larr; {(prevPage as PageFrontMatter).title}</span>
5252
</a>
5353
)}
5454
{(nextPage && nextPage.slug && nextPage.title) && (
5555
<a href={`/docs/${(nextPage as PageFrontMatter).slug}`}
5656
title={nextPage.title}
57-
className={`border border-vulcan-100 hover:border-teal-900 rounded-sm w-1/2 p-4 items-end ml-auto flex flex-col gap-2 text-teal-500 hover:text-teal-900`}>
57+
className={`border border-vulcan-100 hover:border-teal-900 rounded w-1/2 p-4 items-end ml-auto flex flex-col gap-2 text-teal-500 hover:text-teal-900`}>
5858
<span className="text-base text-whisper-500">Next</span>
5959
<span>{(nextPage as PageFrontMatter).title} &rarr;</span>
6060
</a>

components/GitHub/Stargazers.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import { Extension } from '../../constants/extension';
55
import { StarService } from '../../services/StarService';
66
import { GitHub } from '../Images/GitHub';
77

8-
export interface IStargazersProps {}
8+
export interface IStargazersProps { }
99

1010
export const Stargazers: React.FunctionComponent<IStargazersProps> = (props: React.PropsWithChildren<IStargazersProps>) => {
11-
const [ stars, setStars ] = useState<number | null>(null);
12-
const [ calling, setCalling ] = useState<boolean>(false);
11+
const [stars, setStars] = useState<number | null>(null);
12+
const [calling, setCalling] = useState<boolean>(false);
1313

1414
useEffect(() => {
1515
const getStars = async () => {
@@ -23,10 +23,10 @@ export const Stargazers: React.FunctionComponent<IStargazersProps> = (props: Rea
2323
}, [calling]);
2424

2525
return (
26-
<div className={`stargazers group flex items-center`} style={{height:"36px"}}>
27-
<Link
26+
<div className={`stargazers group flex items-center`} style={{ height: "36px" }}>
27+
<Link
2828
href={Extension.githubLink}
29-
className={`h-full flex items-center bg-whisper-500 text-vulcan-500 p-2 text-xs font-bold group-hover:bg-whisper-700`}
29+
className={`h-full flex items-center bg-whisper-500 text-vulcan-500 p-2 text-xs font-bold group-hover:bg-whisper-700 rounded`}
3030
title={`Give the project a star on GitHub`}>
3131
<GitHub className={`h-4 w-4 mr-1`} />
3232
<span>Star</span>
@@ -41,7 +41,7 @@ export const Stargazers: React.FunctionComponent<IStargazersProps> = (props: Rea
4141

4242
<Link
4343
href={Extension.stars}
44-
className={`h-full flex items-center bg-whisper-500 text-vulcan-500 p-2 text-xs font-bold group-hover:bg-whisper-700`}
44+
className={`h-full flex items-center bg-whisper-500 text-vulcan-500 p-2 text-xs font-bold group-hover:bg-whisper-700 rounded`}
4545
title={`Give the project a star on GitHub`}>
4646
{stars}
4747
</Link>

components/Page/CTA.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Extension } from '../../constants/extension';
44
import { isProduction } from '../../helpers/isProduction';
55
import { FrontMatterLines } from './FrontMatterLines';
66

7-
export interface ICTAProps {}
7+
export interface ICTAProps { }
88

99
export const CTA: React.FunctionComponent<ICTAProps> = (props: React.PropsWithChildren<ICTAProps>) => {
1010
const { t: strings } = useTranslation();
@@ -33,10 +33,10 @@ export const CTA: React.FunctionComponent<ICTAProps> = (props: React.PropsWithCh
3333

3434
<div className="mt-10 max-w-sm mx-auto sm:max-w-none">
3535
<div className="space-y-4 sm:space-y-0 sm:mx-auto sm:inline-grid sm:grid-cols-2 sm:gap-5">
36-
<a href={`/docs/getting-started`} title={`Read our documentation`} className="flex items-center justify-center px-4 py-3 border border-transparent text-base font-medium shadow-sm text-white bg-teal-500 hover:bg-opacity-70 sm:px-8">
36+
<a href={`/docs/getting-started`} title={`Read our documentation`} className="flex items-center justify-center px-4 py-3 border border-transparent rounded text-base font-medium shadow-sm text-white bg-teal-500 hover:bg-opacity-70 sm:px-8">
3737
{strings(`cta_button_primary`) as string}
3838
</a>
39-
<a href={isProduction() ? Extension.installLink : Extension.installBetaLink} className="flex items-center justify-center px-4 py-3 border border-transparent text-base font-medium shadow-sm text-vulcan-500 bg-whisper-500 hover:bg-opacity-70 sm:px-8">
39+
<a href={isProduction() ? Extension.installLink : Extension.installBetaLink} className="flex items-center justify-center px-4 py-3 border border-transparent rounded text-base font-medium shadow-sm text-vulcan-500 bg-whisper-500 hover:bg-opacity-70 sm:px-8">
4040
{isProduction() ? strings(`cta_button_secondary`) as string : strings(`cta_button_beta_secondary`) as string}
4141
</a>
4242
</div>
@@ -47,8 +47,8 @@ export const CTA: React.FunctionComponent<ICTAProps> = (props: React.PropsWithCh
4747
<div className="sm:mx-auto sm:max-w-3xl sm:px-6">
4848
<div className={`py-12 sm:relative sm:py-16 lg:absolute lg:inset-y-0 lg:right-0 lg:w-1/2`}>
4949
<div className={`relative sm:mx-auto sm:max-w-3xl sm:px-0 lg:-mr-40 lg:max-w-none lg:h-full lg:pl-12`}>
50-
<img
51-
className={`w-full lg:h-full lg:w-auto lg:max-w-none`}
50+
<img
51+
className={`w-full lg:h-full lg:w-auto lg:max-w-none`}
5252
// src={`https://res.cloudinary.com/estruyf/image/upload/w_1256/v1631871148/frontmatter/preview-3.2.0.png`}
5353
// src={"https://res.cloudinary.com/estruyf/image/upload/w_1256/v1649328023/frontmatter/7.1.0/panel-preview-light.png"}
5454
src={"https://res.cloudinary.com/estruyf/image/upload/w_1256/v1649335002/frontmatter/7.1.0/fm-doc-screenshot.png"}

components/Page/Features.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const Features: React.FunctionComponent<IFeaturesProps> = (props: React.P
4444
<div className="mt-4">
4545
<Link
4646
href={Extension.featureLink}
47-
className={`inline-block px-4 py-3 border border-transparent text-base font-medium shadow-sm text-white bg-vulcan-50 hover:bg-opacity-70 sm:px-8`}
47+
className={`inline-block px-4 py-3 border border-transparent rounded text-base font-medium shadow-sm text-white bg-vulcan-50 hover:bg-opacity-70 sm:px-8`}
4848
target={`_blank`}
4949
rel={`noopener noreferrer`}>
5050
{strings(`features_cta_button`) as string}

components/Page/GetStarted.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ export const GetStarted: React.FunctionComponent<IGetStartedProps> = (props: Rea
1515
<span className="block">Ready to get started?</span>
1616
</h2>
1717
<div className="mt-6 lg:mt-auto space-y-4 sm:space-y-0 sm:flex sm:space-x-5">
18-
<a href={isProduction() ? Extension.installLink : Extension.installBetaLink} title={`Read our documentation`} className="flex items-center justify-center px-4 py-3 border border-transparent text-base font-medium shadow-sm text-white bg-teal-500 hover:bg-opacity-70 sm:px-8">
18+
<a href={isProduction() ? Extension.installLink : Extension.installBetaLink} title={`Read our documentation`} className="flex items-center justify-center px-4 py-3 border border-transparent rounded text-base font-medium shadow-sm text-white bg-teal-500 hover:bg-opacity-70 sm:px-8">
1919
{strings(`cta_button_bottom_primary`) as string}
2020
</a>
21-
<a href={`/docs/getting-started`} className="flex items-center justify-center px-4 py-3 border border-transparent text-base font-medium shadow-sm text-vulcan-500 bg-whisper-500 hover:bg-opacity-70 sm:px-8">
21+
<a href={`/docs/getting-started`} className="flex items-center justify-center px-4 py-3 border border-transparent rounded text-base font-medium shadow-sm text-vulcan-500 bg-whisper-500 hover:bg-opacity-70 sm:px-8">
2222
{strings(`cta_button_bottom_secondary`) as string}
2323
</a>
2424
</div>

components/Page/Hero.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const Hero: React.FunctionComponent<IHeroProps> = ({ view, title, descrip
3636
<Link
3737
href={link}
3838
title={linkText}
39-
className={`inline-block px-4 py-3 border border-transparent text-base font-medium shadow-sm text-white bg-teal-500 hover:bg-opacity-70 sm:px-8`}>
39+
className={`inline-block px-4 py-3 border border-transparent text-base font-medium rounded shadow-sm text-white bg-teal-500 hover:bg-opacity-70 sm:px-8`}>
4040
{linkText}
4141
</Link>
4242
)

components/Pricing/Pricing.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const Pricing: React.FunctionComponent<IPricingProps> = (props: React.Pro
2121

2222
<navigation.sponsor.icon
2323
title={strings(`pricing_cta_title`)}
24-
btnClassName={`group mt-4 inline-block px-4 py-3 border border-transparent text-base font-medium shadow-sm text-white bg-vulcan-50 hover:bg-vulcan-500 sm:px-8`}
24+
btnClassName={`group mt-4 inline-block px-4 py-3 border border-transparent rounded text-base font-medium shadow-sm text-white bg-vulcan-50 hover:bg-vulcan-500 sm:px-8`}
2525
className="inline-block h-6 w-6"
2626
aria-hidden="true" />
2727
</div>

components/modal/Modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const Modal: React.FunctionComponent<React.PropsWithChildren<IModalProps>
3737
leaveFrom="opacity-100 translate-y-0 sm:scale-100"
3838
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
3939
>
40-
<div className="inline-block align-bottom bg-vulcan-200 px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-sm sm:w-full sm:p-6">
40+
<div className="inline-block align-bottom bg-vulcan-200 px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-sm sm:w-full sm:p-6 rounded">
4141
{children}
4242
</div>
4343
</Transition.Child>

0 commit comments

Comments
 (0)