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 run: npm ci
- name: Check types - name: Check types
run: npm run check:types run: npm run typecheck
- name: Lint with Biome - name: Lint with Biome
run: npm run check:code run: npm run check:code
@ -29,14 +29,14 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event.deployment_status.state == 'success' if: github.event.deployment_status.state == 'success'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: Install Playwright - name: Install Playwright
run: npx playwright install --with-deps run: npx playwright install --with-deps
- name: Run Playwright tests - name: Run Playwright tests
run: npx playwright test run: npx playwright test
env: env:
BASE_URL: ${{ github.event.deployment_status.target_url }} BASE_URL: ${{ github.event.deployment_status.target_url }}

View File

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

View File

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

View File

@ -34,7 +34,7 @@ export const HeaderAuth = (props: Props) => {
const { page } = useRouter() const { page } = useRouter()
const { session, author, isSessionLoaded } = useSession() const { session, author, isSessionLoaded } = useSession()
const { unreadNotificationsCount, showNotificationsPanel } = useNotifications() const { unreadNotificationsCount, showNotificationsPanel } = useNotifications()
const { form, toggleEditorPanel, saveShout, saveDraft, publishShout } = useEditorContext() const { form, toggleEditorPanel, publishShout } = useEditorContext()
const handleBellIconClick = (event: Event) => { const handleBellIconClick = (event: Event) => {
event.preventDefault() event.preventDefault()
@ -57,16 +57,6 @@ export const HeaderAuth = (props: Props) => {
toggleEditorPanel() 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 [width, setWidth] = createSignal(0)
const [editorMode, setEditorMode] = createSignal(t('Editing')) const [editorMode, setEditorMode] = createSignal(t('Editing'))