Skip to content

Commit

Permalink
welcome code
Browse files Browse the repository at this point in the history
  • Loading branch information
tnfAngel committed May 29, 2024
1 parent 3d31667 commit 323947e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
7 changes: 2 additions & 5 deletions src/components/general/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import CodeMirror from '@uiw/react-codemirror';
import { useCallback, useEffect, useRef } from 'react';
import './Editor.css';

export const welcomeCode =
"// Start writing here! When you're done, hit the save button to generate a unique URL with your content.";

const Editor = ({ setInformation, value, setValue, documentId, isEditing, enableEdit }: EditorProps) => {
const editorRef = useRef<any>(null);

Expand All @@ -31,6 +28,7 @@ const Editor = ({ setInformation, value, setValue, documentId, isEditing, enable
return (
<Box h='100%' w='100%' bg='editor'>
<CodeMirror
placeholder="// Start writing here! When you're done, hit the save button to generate a unique URL with your content."
value={value}
height='100%'
maxWidth='100%'
Expand All @@ -47,8 +45,7 @@ const Editor = ({ setInformation, value, setValue, documentId, isEditing, enable
}}
theme='dark'
style={{
height: '100%',
overflow: 'auto'
height: '100%'
}}
/>
</Box>
Expand Down
6 changes: 1 addition & 5 deletions src/components/general/Information.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import LogoIcon from '@/components/LogoIcon.tsx';
import { welcomeCode } from '@/components/general/Editor.tsx';
import useLanguage from '@/hooks/useLanguage';
import useThemeValues from '@/hooks/useThemeValues';
import useLanguageStore from '@/store/language';
Expand Down Expand Up @@ -76,10 +75,7 @@ const Information = ({ lineNumber, columnNumber }: InformationProps) => {
>
<InformationLabel label={libraryVersion} icon={<LogoIcon fontSize='15px' />} />
<InformationLabel
label={`Ln ${(lineNumber || 1).toString().padStart(2, '0')} Col ${(lineNumber
? columnNumber
: welcomeCode.length + 1
)
label={`Ln ${(lineNumber || 1).toString().padStart(2, '0')} Col ${(lineNumber ? columnNumber : 0)
.toString()
.padStart(2, '0')}`}
/>
Expand Down

0 comments on commit 323947e

Please sign in to comment.