Skip to content

Commit 7578818

Browse files
committed
migrate to latest nx
1 parent 187a1ef commit 7578818

File tree

39 files changed

+812
-699
lines changed

39 files changed

+812
-699
lines changed

apps/converter-frontend/components/app-shell-layout/app-shell-layout.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ export function AppShellLayout(props: AppShellLayoutProps) {
2828
// navbarOffsetBreakpoint controls when navbar should no longer be offset with padding-left
2929
navbarOffsetBreakpoint="sm"
3030
// fixed prop on AppShell will be automatically added to Header and Navbar
31-
fixed
31+
fixed={true}
3232
header={
33-
<Header height={70} padding="md">
33+
<Header height={70}>
3434
{/* Handle other responsive styles with MediaQuery component or createStyles function */}
3535
<div
3636
style={{ display: 'flex', alignItems: 'center', height: '100%' }}
@@ -59,7 +59,6 @@ export function AppShellLayout(props: AppShellLayoutProps) {
5959
}
6060
navbar={
6161
<Navbar
62-
padding="md"
6362
// Breakpoint at which navbar will be hidden if hidden prop is true
6463
hiddenBreakpoint="sm"
6564
// Hides navbar when viewport size is less than value specified in hiddenBreakpoint
@@ -70,7 +69,7 @@ export function AppShellLayout(props: AppShellLayoutProps) {
7069
width={{ sm: 300, lg: 400 }}
7170
>
7271
<Navbar.Section>Journal of Trial and Error</Navbar.Section>
73-
<Navbar.Section grow mt="lg">
72+
<Navbar.Section grow={true} mt="lg">
7473
<VStack>
7574
<Link href="/">Convert</Link>
7675
<Link href="/ojs">OJS Integration</Link>

apps/converter-frontend/components/conversion/conversion.tsx

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -84,32 +84,29 @@ export function Conversion(props: ConversionProps) {
8484
setInput(buf)
8585
}}
8686
>
87-
{(status) => (
88-
<Group
89-
position="center"
90-
spacing="xl"
91-
style={{ minHeight: 220, pointerEvents: 'none' }}
92-
>
93-
<AiOutlineUpload
94-
//status={status}
95-
style={{
96-
width: 80,
97-
height: 80,
98-
color: status ? 'green' : 'grey',
99-
}}
100-
/>
87+
<Group
88+
position="center"
89+
spacing="xl"
90+
style={{ minHeight: 220, pointerEvents: 'none' }}
91+
>
92+
<AiOutlineUpload
93+
//status={status}
94+
style={{
95+
width: 80,
96+
height: 80,
97+
// color: status ? 'green' : 'grey',
98+
}}
99+
/>
101100

102-
<div>
103-
<Text size="xl" inline>
104-
Drag images here or click to select files
105-
</Text>
106-
<Text size="sm" color="dimmed" inline mt={7}>
107-
Attach as many files as you like, each file should not exceed
108-
5mb
109-
</Text>
110-
</div>
111-
</Group>
112-
)}
101+
<div>
102+
<Text size="xl" inline={true}>
103+
Drag images here or click to select files
104+
</Text>
105+
<Text size="sm" color="dimmed" inline={true} mt={7}>
106+
Attach as many files as you like, each file should not exceed 5mb
107+
</Text>
108+
</div>
109+
</Group>
113110
</Dropzone>
114111
{from !== 'docx' && (
115112
<>

apps/converter-frontend/components/converted-block-local/converted-block-local.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@ import { useClipboard } from '@mantine/hooks'
33
import React, { useEffect, useState } from 'react'
44
import { VFile } from 'vfile'
55
import { Prism as SyntaxHighlighter } from '@mantine/prism'
6-
import { FaClipboard, FaClipboardList } from 'react-icons/fa'
7-
import { HStack } from '../stack/stack'
86
import shallow from 'zustand/shallow'
97
import { useStore } from '../../utils/store'
108

11-
import Prism from 'prism-react-renderer/prism'
12-
;(typeof global !== 'undefined' ? global : window).Prism = Prism
9+
// import Prism from 'prism-react-renderer/prism'
10+
// ;(typeof global !== 'undefined' ? global : window).Prism = Prism
1311

14-
require('prismjs/components/prism-latex')
12+
// require('prismjs/components/prism-latex')
1513
//import { nord } from 'react-syntax-highlighter/dist/esm/styles/prism'
1614

1715
/* eslint-disable-next-line */
@@ -59,7 +57,7 @@ export function ConvertedBlockLocal(props: ConvertedBlockLocalProps) {
5957
{/* @ts-ignore */}
6058
{vfile?.messages && (
6159
<>
62-
<Box height="20">Images extracted from doc</Box>
60+
<Box>Images extracted from doc</Box>
6361
<Box>
6462
{vfile?.data?.images
6563
? Object.entries(
@@ -87,7 +85,7 @@ export function ConvertedBlockLocal(props: ConvertedBlockLocalProps) {
8785
)}
8886
{vfile?.messages && (
8987
<>
90-
<Box height="20">Errors and warnings</Box>
88+
<Box>Errors and warnings</Box>
9189
{vfile?.messages.map((message) => (
9290
<Text key={String(message)}>{String(message)} </Text>
9391
))}
@@ -121,10 +119,9 @@ export function ConvertedBlockLocal(props: ConvertedBlockLocalProps) {
121119
</HStack>
122120
</Button> */}
123121
<SyntaxHighlighter
124-
//wrapLines
125122
withLineNumbers={true}
123+
// @ts-expect-error yeahhhh
126124
language="latex"
127-
// CodeTag={Code}
128125
sx={{}}
129126
style={{
130127
maxWidth: '100%',

apps/converter-frontend/components/publications-list/citations.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
import { Code, Container, Tabs, Text } from '@mantine/core'
1+
import { Container, Text } from '@mantine/core'
22
import { definitions } from 'ojs-client'
3-
import React from 'react'
43
import useSWR from 'swr'
54
import { Data as CSL } from 'csl-json'
65
// @ts-expect-error no types for cites
76
import Cite from 'citation-js'
8-
import { Prism } from '@mantine/prism'
97

108
export const Citations = ({
119
value,
@@ -44,7 +42,9 @@ export const Citations = ({
4442
console.log(data)
4543
const cite = new Cite(
4644
data.map((data: CSL) => {
47-
if (!data.type) data.type = 'article'
45+
if (!data.type) {
46+
data.type = 'article'
47+
}
4848
return data
4949
})
5050
)

apps/converter-frontend/components/publications-list/file-reel.tsx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,20 @@ export const FileReel = (props: {
2020
endpoint
2121
)}`
2222
)
23-
if (!data) return <Loader />
24-
if (error) return <Text color="red">{JSON.stringify(error)}</Text>
23+
if (!data) {
24+
return <Loader />
25+
}
26+
if (error) {
27+
return <Text color="red">{JSON.stringify(error)}</Text>
28+
}
2529

26-
if (!data.items) return <Text> No Files </Text>
30+
if (!data.items) {
31+
return <Text> No Files </Text>
32+
}
2733

28-
if (!stageId) return <></>
34+
if (!stageId) {
35+
return <></>
36+
}
2937

3038
const getStageId = (file: definitions['SubmissionFile']): number =>
3139
parseInt(file?.url?.slice(-1) || '0')
@@ -58,7 +66,9 @@ export const FileReel = (props: {
5866
curr: definitions['SubmissionFile']
5967
) => {
6068
const id = getStageId(curr)
61-
if (!id) return
69+
if (!id) {
70+
return
71+
}
6272
acc[id] = [...(acc?.[id] || []), curr]
6373
return acc
6474
},

0 commit comments

Comments
 (0)