Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm authored and github-actions[bot] committed Mar 6, 2024
1 parent 07890f4 commit 7d5d19e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/dev/client/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render } from 'hono/jsx/dom'

import { Provider, dataId } from '../lib/context.js'
import { App } from '../components/App.js'
import { Provider, dataId } from '../lib/context.js'

const element = document.getElementById(dataId)
const value = JSON.parse(element!.textContent!)
Expand Down
10 changes: 4 additions & 6 deletions src/dev/components/Navigator.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { useRef, useState as useLocalState, useEffect } from 'hono/jsx/dom'
import { useEffect, useRef, useState as useLocalState } from 'hono/jsx/dom'

import { useDispatch } from '../hooks/useDispatch.js'
import { useFocusTrap } from '../hooks/useFocusTrap.js'
import { useState } from '../hooks/useState.js'
import { type Data, type User } from '../types.js'
import { formatUrl } from '../utils/format.js'
import { AuthDialog } from './AuthDialog.js'
import {
chevronLeftIcon,
chevronRightIcon,
Expand All @@ -13,8 +15,6 @@ import {
personIcon,
refreshIcon,
} from './icons.js'
import { useFocusTrap } from '../hooks/useFocusTrap.js'
import { AuthDialog } from './AuthDialog.js'

type NavigatorProps = { url: string; routes: readonly string[] }

Expand Down Expand Up @@ -413,9 +413,7 @@ function AddressBar(props: AddressBarProps) {

setMounted(false)

const nextFrame = window.location
.toString()
.replace('/dev', '')
const nextFrame = window.location.toString().replace('/dev', '')
const json = await getFrame(nextFrame, { replaceLogs: true })
const id = json.id

Expand Down
10 changes: 5 additions & 5 deletions src/dev/components/Preview.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useState as useLocalState, useRef } from 'hono/jsx/dom'
import { useRef, useState as useLocalState } from 'hono/jsx/dom'

import { type Frame } from '../types.js'
import { clsx } from '../lib/clsx.js'
import { externalLinkIcon, half2Icon, warpIcon } from './icons.js'
import { useState } from '../hooks/useState.js'
import { useDispatch } from '../hooks/useDispatch.js'
import { useFocusTrap } from '../hooks/useFocusTrap.js'
import { useState } from '../hooks/useState.js'
import { clsx } from '../lib/clsx.js'
import { type Frame } from '../types.js'
import { externalLinkIcon, half2Icon, warpIcon } from './icons.js'

type PreviewProps = {
frame: Frame
Expand Down
6 changes: 3 additions & 3 deletions src/dev/components/Timeline.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { useCallback, useState as useLocalState, useRef } from 'hono/jsx/dom'
import { useCallback, useRef, useState as useLocalState } from 'hono/jsx/dom'

import { useDispatch } from '../hooks/useDispatch.js'
import { useFocusTrap } from '../hooks/useFocusTrap.js'
import { clsx } from '../lib/clsx.js'
import type { State } from '../lib/context.js'
import { type Data } from '../types.js'
import { formatSpeed, formatTime } from '../utils/format.js'
import {
Expand All @@ -12,8 +14,6 @@ import {
pencil2Icon,
resetIcon,
} from './icons.js'
import { useFocusTrap } from '../hooks/useFocusTrap.js'
import type { State } from '../lib/context.js'

type TimelineProps = {
dataKey: string
Expand Down
4 changes: 2 additions & 2 deletions src/dev/hooks/useFocusTrap.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createFocusTrap, type Options } from 'focus-trap'
import { useEffect } from 'hono/jsx/dom'
import { type Options, createFocusTrap } from 'focus-trap'
import { type RefObject } from 'hono/jsx'
import { useEffect } from 'hono/jsx/dom'

import { type Pretty } from '../../types/utils.js'

Expand Down
6 changes: 3 additions & 3 deletions src/dev/lib/context.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { createContext, type PropsWithChildren } from 'hono/jsx'
import { type PropsWithChildren, createContext } from 'hono/jsx'
import { useEffect, useState } from 'hono/jsx/dom'
import LZString from 'lz-string'

import { parsePath } from '../../utils/parsePath.js'
import { toSearchParams } from '../../utils/toSearchParams.js'
import {
type BaseData,
type Data,
Expand All @@ -10,8 +12,6 @@ import {
type RequestBody,
type User,
} from '../types.js'
import { toSearchParams } from '../../utils/toSearchParams.js'
import { parsePath } from '../../utils/parsePath.js'

export const dataId = '__FROG_DATA__'

Expand Down

0 comments on commit 7d5d19e

Please sign in to comment.