Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
fix(web): remove npm prismjs package
Browse files Browse the repository at this point in the history
  • Loading branch information
mayocream committed Oct 16, 2021
1 parent e47e4da commit 569b7d3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
11 changes: 0 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"framer-motion": "^4.1.17",
"i18next": "^20.6.1",
"notistack": "^2.0.2",
"prismjs": "^1.25.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-hook-form": "^7.15.3",
Expand All @@ -28,7 +27,6 @@
},
"devDependencies": {
"@emotion/serialize": "^1.0.2",
"@types/prismjs": "^1.16.6",
"@types/reach__router": "^1.3.9",
"@types/react": "^17.0.21",
"@types/react-dom": "^17.0.9",
Expand Down
14 changes: 8 additions & 6 deletions src/pages/Publish.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import React, { useState, useEffect } from 'react'
import { Button, Fab, Switch, TextField } from '@mui/material'
import { Container, Paper } from '@mui/material'
import { Controller, useForm } from 'react-hook-form'
import { highlight, languages } from 'prismjs'
// import { highlight, languages } from 'prismjs'

import 'twin.macro'
import 'prismjs/components/prism-clike'
import 'prismjs/components/prism-javascript'
import 'prismjs/components/prism-markup'
import 'prismjs/components/prism-css'
// import 'prismjs/components/prism-clike'
// import 'prismjs/components/prism-javascript'
// import 'prismjs/components/prism-markup'
// import 'prismjs/components/prism-css'

import AddIcon from '@mui/icons-material/Add'
import Editor from 'react-simple-code-editor'
Expand Down Expand Up @@ -81,10 +81,12 @@ function Publish(props: RouteComponentProps) {
</div>
<div tw="my-4 min-w-[800px] max-w-[800px]">
<Paper variant="outlined">
{/* TODO replace editor with multiline textarea input */}
<Editor
value={text}
onValueChange={(text) => setText(text)}
highlight={(text) => highlight(text, languages.markup, 'markup')}
highlight={(text) => text}
// highlight={(text) => highlight(text, languages.markup, 'markup')}
padding={14}
tabSize={4}
insertSpaces={true}
Expand Down

0 comments on commit 569b7d3

Please sign in to comment.