hotifx-dx

This commit is contained in:
Untone 2024-05-06 23:45:54 +03:00
parent a024080661
commit e6888d2549
4 changed files with 14 additions and 25 deletions

View File

@ -13,7 +13,7 @@ jobs:
run: npm ci
- name: Check types
run: npm run check:types
run: npm run typecheck
- name: Lint with Biome
run: npm run check:code

View File

@ -24,8 +24,8 @@
"lint:styles:fix": "stylelint **/*.{scss,css} --fix",
"preview": "vite preview",
"start": "vite",
"check:types": "tsc --noEmit",
"check:types:watch": "tsc --noEmit --watch"
"typecheck": "tsc --noEmit",
"typecheck:watch": "tsc --noEmit --watch"
},
"dependencies": {
"form-data": "4.0.0",

View File

@ -28,7 +28,6 @@ const embedData = (data) => {
const result: { src: string; width?: string; height?: string } = { src: '' }
// biome-ignore lint/style/useForOf: <explanation>
for (let i = 0; i < attributes.length; i++) {
const attribute = attributes.item(i)
if (attribute) {

View File

@ -34,7 +34,7 @@ export const HeaderAuth = (props: Props) => {
const { page } = useRouter()
const { session, author, isSessionLoaded } = useSession()
const { unreadNotificationsCount, showNotificationsPanel } = useNotifications()
const { form, toggleEditorPanel, saveShout, saveDraft, publishShout } = useEditorContext()
const { form, toggleEditorPanel, publishShout } = useEditorContext()
const handleBellIconClick = (event: Event) => {
event.preventDefault()
@ -57,16 +57,6 @@ export const HeaderAuth = (props: Props) => {
toggleEditorPanel()
}
// FIXME: use or remove
const handleSaveClick = () => {
const hasTopics = form.selectedTopics?.length > 0
if (hasTopics) {
saveShout(form)
} else {
saveDraft(form)
}
}
const [width, setWidth] = createSignal(0)
const [editorMode, setEditorMode] = createSignal(t('Editing'))