Skip to content

Commit

Permalink
fix: import order
Browse files Browse the repository at this point in the history
  • Loading branch information
p1atdev authored and ddPn08 committed Feb 8, 2023
1 parent f18d9e5 commit d808c5e
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 13 deletions.
11 changes: 6 additions & 5 deletions frontend/src/app.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { MantineProvider, Box, Flex } from '@mantine/core'
import { Tab } from './types/tab'
import Tabs from './components/tabs'
import Generator from './tabs/gemerator'
import { useState } from 'react'
import Engine from './tabs/engine'
import { IconEngine, IconPhotoEdit } from '@tabler/icons-react'
import { useAtomValue } from 'jotai'
import { useState } from 'react'

import { themeAtom } from './atoms/theme'
import Tabs from './components/tabs'
import Engine from './tabs/engine'
import Generator from './tabs/generator'
import { Tab } from './types/tab'

const TABS: Tab[] = [
{
Expand Down
1 change: 1 addition & 0 deletions frontend/src/atoms/generationParameters.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { atom } from 'jotai'

import { SchedulerName } from '~/types/generate'

export interface GenerationParameters {
Expand Down
8 changes: 5 additions & 3 deletions frontend/src/components/parameters.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { Flex, NativeSelect } from '@mantine/core'
import { useAtom } from 'jotai'
import { generationParametersAtom } from '~/atoms/generationParameters'
import NumberSliderInput from '~/components/ui/numberSliderInput'
import { schedulerNames } from '~/types/generate'

import ImageSizeParameter from './parameters/imageSizeParameter'
import ModelParameter from './parameters/modelParameter'
import SeedParameter from './parameters/seedParameter'

import { generationParametersAtom } from '~/atoms/generationParameters'
import NumberSliderInput from '~/components/ui/numberSliderInput'
import { schedulerNames } from '~/types/generate'

const Parameters = () => {
const [parameters, setParameters] = useAtom(generationParametersAtom)

Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/parameters/imageSizeParameter.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ActionIcon, Flex, Input } from '@mantine/core'
import { IconArrowsLeftRight } from '@tabler/icons-react'
import { useAtom } from 'jotai'

import { generationParametersAtom } from '~/atoms/generationParameters'
import BetterNumInput from '~/components/ui/betterNumInput'
import { IMAGE_SIZE_STEP, MAX_IMAGE_SIZE, MIN_IMAGE_SIZE } from '~/utils/static'
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/parameters/modelParameter.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ActionIcon, Flex, Input, NativeSelect, Skeleton } from '@mantine/core'
import { IconRotateClockwise } from '@tabler/icons-react'
import { useEffect, useState } from 'react'

import { api } from '~/api'

const ModelParameter = () => {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/parameters/seedParameter.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ActionIcon, Flex, Input } from '@mantine/core'
import { IconDice5 } from '@tabler/icons-react'
import { useAtom } from 'jotai'

import { generationParametersAtom } from '~/atoms/generationParameters'
import BetterNumInput from '~/components/ui/betterNumInput'
import { generateRandomNumber } from '~/utils/rand'
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Box, Center, createStyles, Flex, MediaQuery, Navbar, Stack } from '@mantine/core'
import { Tab } from '../types/tab'

import GithubButton from './githubButton'
import ThemeToggle from './themeToggle'
import { Tab } from '../types/tab'

interface Props {
current?: string | number | undefined
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/themeToggle.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ActionIcon, Center } from '@mantine/core'
import { IconMoon, IconSun } from '@tabler/icons-react'
import { useAtom } from 'jotai'

import { themeAtom } from '../atoms/theme'

const ThemeToggle = () => {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/ui/numberSliderInput.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Flex, Input, InputWrapperBaseProps, Slider } from '@mantine/core'
import { useRef, useState } from 'react'

import BetterNumInput from './betterNumInput'

interface Props extends InputWrapperBaseProps {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import ReactDOM from 'react-dom/client'

import App from './app'

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
Expand Down
11 changes: 7 additions & 4 deletions frontend/src/tabs/engine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ import {
Alert,
Loader,
} from '@mantine/core'
import { IconInfoCircle } from '@tabler/icons-react'
import { BuildRequest } from 'internal:api'
import { useAtom } from 'jotai'
import { useState } from 'react'

import NumberSliderInput from '../components/ui/numberSliderInput'

import { api } from '~/api'
import { BuildRequest } from 'internal:api'
import { IconInfoCircle } from '@tabler/icons-react'
import { IMAGE_SIZE_STEP, MAX_IMAGE_SIZE, MIN_IMAGE_SIZE } from '~/utils/static'
import { useAtom } from 'jotai'
import { engineFormAtom } from '~/atoms/engine'
import { IMAGE_SIZE_STEP, MAX_IMAGE_SIZE, MIN_IMAGE_SIZE } from '~/utils/static'


const Engine = () => {
const [form, setForm] = useAtom(engineFormAtom)
Expand Down
1 change: 1 addition & 0 deletions frontend/src/tabs/gemerator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
import { useMediaQuery } from '@mantine/hooks'
import { useAtom } from 'jotai'
import { useState } from 'react'

import { api, createUrl } from '~/api'
import {
GenerationParamertersForm,
Expand Down

0 comments on commit d808c5e

Please sign in to comment.