Browse Source

[Beta] Add some types (#4728)

* [Beta] Optimize some performance

* Unnecessary image optimization

* Unused optimizeFonts
main
ycjcl868 3 years ago
committed by GitHub
parent
commit
022c8ff29d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      beta/next.config.js
  2. 1
      beta/package.json
  3. 2
      beta/src/components/MDX/Challenges/Navigation.tsx
  4. 1
      beta/src/components/MDX/Heading.tsx
  5. 5
      beta/yarn.lock

7
beta/next.config.js

@ -6,7 +6,10 @@ const path = require('path');
const {remarkPlugins} = require('./plugins/markdownToHtml');
const redirects = require('./src/redirects.json');
module.exports = {
/**
* @type {import('next').NextConfig}
**/
const nextConfig = {
pageExtensions: ['jsx', 'js', 'ts', 'tsx', 'mdx', 'md'],
experimental: {
plugins: true,
@ -80,3 +83,5 @@ module.exports = {
return config;
},
};
module.exports = nextConfig;

1
beta/package.json

@ -44,6 +44,7 @@
"@mdx-js/loader": "^1.6.16",
"@types/body-scroll-lock": "^2.6.1",
"@types/classnames": "^2.2.10",
"@types/debounce": "^1.2.1",
"@types/github-slugger": "^1.3.0",
"@types/mdx-js__react": "^1.5.2",
"@types/node": "^14.6.4",

2
beta/src/components/MDX/Challenges/Navigation.tsx

@ -6,7 +6,7 @@ import React, {createRef} from 'react';
import cn from 'classnames';
import {IconChevron} from 'components/Icon/IconChevron';
import {ChallengeContents} from './Challenges';
const debounce = require('debounce');
import {debounce} from 'debounce';
export function Navigation({
challenges,

1
beta/src/components/MDX/Heading.tsx

@ -4,7 +4,6 @@
import cn from 'classnames';
import * as React from 'react';
import {siteConfig} from 'siteConfig';
import {forwardRefWithAs} from 'utils/forwardRefWithAs';
export interface HeadingProps {
className?: string;

5
beta/yarn.lock

@ -846,6 +846,11 @@
dependencies:
classnames "*"
"@types/debounce@^1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@types/debounce/-/debounce-1.2.1.tgz#79b65710bc8b6d44094d286aecf38e44f9627852"
integrity sha512-epMsEE85fi4lfmJUH/89/iV/LI+F5CvNIvmgs5g5jYFPfhO2S/ae8WSsLOKWdwtoaZw9Q2IhJ4tQ5tFCcS/4HA==
"@types/eslint-visitor-keys@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d"

Loading…
Cancel
Save