This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
export interface ExternalLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> { | |
ariaLabel?: string; | |
ariaLabelledBy?: string; | |
className?: string; | |
} | |
export const ExternalLink: React.FC<ExternalLinkProps> = ({ | |
className, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export async function render({ req, res }: RendererOptions): Promise<void> { | |
const context: StaticRouterContext = {}; | |
const appString = renderToString( | |
<StaticRouter location={req.url} context={context}> | |
<Routes /> | |
</StaticRouter>, | |
); | |
const scriptTags = ['vendor', 'client'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const RouteWrapper = function RouteWrapper< | |
P = { children?: ReactNode }, | |
TRoute extends RouteProps = Route | |
>( | |
Wrapper: React.ComponentType<P | {}>, | |
RouteType: React.ComponentType<RouteProps> = Route, | |
options: Partial<TRoute> = {}, | |
wrapperProps: P | {} = {}, | |
) { | |
return function RouteWrapperResuslt({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2021-01-31T09:57:25.656Z","extensionVersion":"v3.4.3"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(Courgette.class) | |
@CourgetteOptions( | |
threads = 1, | |
runLevel = CourgetteRunLevel.FEATURE, | |
rerunFailedScenarios = true, | |
showTestOutput = true, | |
)) | |
public class TestRunner { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Foo { | |
value?: string; | |
} | |
const item1: Foo = { value: 'foo' } | |
// ERROR: Object is possibly 'undefined'. | |
console.log(`Message ${item1.value.substring(4)}`); | |
const item2 = { value: 'foo' } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
process.env.NODE_ENV = 'production'; | |
const webpack = require('webpack'); | |
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; | |
const webpackConfigProd = require('react-scripts/config/webpack.config')('production'); | |
// this one is optional, just for better feedback on build | |
const chalk = require('chalk'); | |
const ProgressBarPlugin = require('progress-bar-webpack-plugin'); | |
const green = text => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
"exclude": [ | |
"src/**/*.test.ts", | |
"src/**/*.test.tsx" | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export enum HexagonType { | |
flat = 'flat', | |
pointy = 'pointy' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button class="bg-blue hover:bg-blue-dark text-white font-bold py-2 px-4 rounded"> | |
Button | |
</button |