chore(org): Linter issues
This commit is contained in:
parent
d2124f7881
commit
0c2abc659d
7 changed files with 4 additions and 34 deletions
|
@ -1,10 +1,9 @@
|
|||
// Dependencies
|
||||
import { nsMerge, capitalize, cloudflareImageUrl, yyyymmdd } from 'shared/utils.mjs'
|
||||
// Hooks
|
||||
import { useState, useEffect } from 'react'
|
||||
import { useState } from 'react'
|
||||
import { useAccount } from 'shared/hooks/use-account.mjs'
|
||||
import { useBackend } from 'shared/hooks/use-backend.mjs'
|
||||
import { useToast } from 'shared/hooks/use-toast.mjs'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
// Components
|
||||
import { Popout } from 'shared/components/popout/index.mjs'
|
||||
|
@ -18,7 +17,6 @@ import {
|
|||
IntroInput,
|
||||
BodyInput,
|
||||
} from './inputs.mjs'
|
||||
import { Collapse } from 'shared/components/collapse.mjs'
|
||||
import { Tab } from 'shared/components/account/bio.mjs'
|
||||
import { CodeBox } from 'shared/components/code-box.mjs'
|
||||
import { PostArticle, ns as mdxNs } from 'site/components/mdx/posts/article.mjs'
|
||||
|
@ -29,10 +27,6 @@ import { WebLink } from 'shared/components/web-link.mjs'
|
|||
|
||||
export const ns = nsMerge('account', 'posts', authNs, mdxNs)
|
||||
|
||||
const Title = ({ children }) => (
|
||||
<h3 className="flex flex-row flex-wrap items-end justify-between">{children}</h3>
|
||||
)
|
||||
|
||||
const Tip = ({ children }) => <p className="italic opacity-70">{children}</p>
|
||||
|
||||
const Item = ({ title, children }) => (
|
||||
|
@ -56,22 +50,9 @@ ${body}
|
|||
|
||||
`
|
||||
|
||||
const Log = ({ log }) =>
|
||||
log[0] ? (
|
||||
<div className="fixed top-28 left-0 w-full z-30">
|
||||
<div
|
||||
className={`w-full max-w-lg m-auto bg-secondary flex flex-row gap-4 p-4 px-4
|
||||
rounded-lg shadow text-secondary-content text-medium bg-opacity-90`}
|
||||
>
|
||||
<Spinner /> {log[1]}
|
||||
</div>
|
||||
</div>
|
||||
) : null
|
||||
|
||||
export const CreateShowcasePost = ({ noTitle = false }) => {
|
||||
export const CreateShowcasePost = () => {
|
||||
const { account } = useAccount()
|
||||
const backend = useBackend()
|
||||
const toast = useToast()
|
||||
const { t, i18n } = useTranslation(ns)
|
||||
const { loading, setLoadingStatus, LoadingStatus } = useLoadingStatus()
|
||||
|
||||
|
@ -301,7 +282,6 @@ const ShowcaseEditor = ({
|
|||
body,
|
||||
setBody,
|
||||
extraImages,
|
||||
setExtraImages,
|
||||
addImage,
|
||||
setExtraImg,
|
||||
t,
|
||||
|
|
|
@ -29,7 +29,7 @@ export const DesignPicker = ({ designs = [], setDesigns }) => {
|
|||
<b>Not featured:</b>
|
||||
{collection
|
||||
.filter((d) => designs.includes(d) === false)
|
||||
.map((d, i) => (
|
||||
.map((d) => (
|
||||
<button
|
||||
key={d}
|
||||
className="btn btn-sm btn-neutral btn-outline hover:btn-success capitalize"
|
||||
|
@ -41,6 +41,4 @@ export const DesignPicker = ({ designs = [], setDesigns }) => {
|
|||
</div>
|
||||
</>
|
||||
)
|
||||
|
||||
return <p>Design picker here</p>
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ import { slugify, slugifyNoTrim, cloudflareImageUrl } from 'shared/utils.mjs'
|
|||
import { useTranslation } from 'react-i18next'
|
||||
import { useEffect, useState, useCallback } from 'react'
|
||||
import { useBackend } from 'shared/hooks/use-backend.mjs'
|
||||
import { useToast } from 'shared/hooks/use-toast.mjs'
|
||||
import { useDropzone } from 'react-dropzone'
|
||||
import { Popout } from 'shared/components/popout/index.mjs'
|
||||
import { Loading } from 'shared/components/spinner.mjs'
|
||||
|
@ -67,7 +66,6 @@ export const SlugInput = ({ slug, setSlug, title }) => {
|
|||
|
||||
export const ImageInput = ({ slug = false, setImg, img, type = 'showcase', subId = false }) => {
|
||||
const backend = useBackend()
|
||||
const toast = useToast()
|
||||
const { t } = useTranslation(ns)
|
||||
const [uploading, setUploading] = useState(false)
|
||||
const [url, setUrl] = useState('')
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import { PageLink } from 'shared/components/page-link.mjs'
|
||||
import { Lightbox } from 'shared/components/lightbox.mjs'
|
||||
import { ImageWrapper } from 'shared/components/wrappers/img.mjs'
|
||||
import { Author } from './author.mjs'
|
||||
|
@ -7,7 +6,7 @@ import { useTranslation } from 'next-i18next'
|
|||
import { MdxWrapper } from 'shared/components/wrappers/mdx.mjs'
|
||||
import { cloudflareImageUrl } from 'shared/utils.mjs'
|
||||
import Markdown from 'react-markdown'
|
||||
import { nsMerge, capitalize } from 'shared/utils.mjs'
|
||||
import { nsMerge } from 'shared/utils.mjs'
|
||||
import { Tag } from 'shared/components/tag.mjs'
|
||||
|
||||
export const ns = nsMerge('common', 'posts', timeagoNs)
|
||||
|
|
|
@ -6,7 +6,6 @@ import { useTranslation } from 'next-i18next'
|
|||
// Components
|
||||
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
|
||||
import { ns as authNs } from 'shared/components/wrappers/auth/index.mjs'
|
||||
import { ns as apikeysNs } from 'shared/components/account/apikeys.mjs'
|
||||
//import { BareLayout } from 'site/components/layouts/bare.mjs'
|
||||
import { Popout } from 'shared/components/popout/index.mjs'
|
||||
|
||||
|
|
|
@ -58,9 +58,6 @@ const NewIndexPage = ({ page }) => {
|
|||
|
||||
const control = account.control ? account.control : 99
|
||||
|
||||
const boxClasses =
|
||||
'p-8 -ml-4 -mr-4 md:m-0 rounded-none md:rounded-xl md:shadow hover:bg-secondary bg-base-200 hover:text-secondary-content'
|
||||
|
||||
return (
|
||||
<PageWrapper {...page} title={t('new')}>
|
||||
<div className="w-full max-w-xl flex flex-col gap-4">
|
||||
|
|
|
@ -6,7 +6,6 @@ import { useTranslation } from 'next-i18next'
|
|||
// Components
|
||||
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
|
||||
import { ns as authNs } from 'shared/components/wrappers/auth/index.mjs'
|
||||
import { ns as apikeysNs } from 'shared/components/account/apikeys.mjs'
|
||||
import { CreateShowcasePost, ns as createNs } from 'site/components/github/create-showcase.mjs'
|
||||
import { BareLayout } from 'site/components/layouts/bare.mjs'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue