chore: auto organize imports in client codebase
The import statements in multiple files have been organized to improve code readability and maintainability. This was done using the `prettier-plugin-organize-imports` plugin.
This commit is contained in:
parent
8b6a8f8abf
commit
c998d61472
7 changed files with 35 additions and 12 deletions
|
@ -8,5 +8,6 @@
|
||||||
"jsxSingleQuote": true,
|
"jsxSingleQuote": true,
|
||||||
"bracketSpacing": true,
|
"bracketSpacing": true,
|
||||||
"jsxBracketSameLine": false,
|
"jsxBracketSameLine": false,
|
||||||
"arrowParens": "always"
|
"arrowParens": "always",
|
||||||
|
"plugins": ["prettier-plugin-organize-imports"]
|
||||||
}
|
}
|
||||||
|
|
21
package-lock.json
generated
21
package-lock.json
generated
|
@ -34,6 +34,7 @@
|
||||||
"eslint-config-next": "14.1.0",
|
"eslint-config-next": "14.1.0",
|
||||||
"postcss": "^8",
|
"postcss": "^8",
|
||||||
"prettier": "^3.2.5",
|
"prettier": "^3.2.5",
|
||||||
|
"prettier-plugin-organize-imports": "^3.2.4",
|
||||||
"tailwindcss": "^3.3.0",
|
"tailwindcss": "^3.3.0",
|
||||||
"typescript": "^5"
|
"typescript": "^5"
|
||||||
},
|
},
|
||||||
|
@ -4338,6 +4339,26 @@
|
||||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/prettier-plugin-organize-imports": {
|
||||||
|
"version": "3.2.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-3.2.4.tgz",
|
||||||
|
"integrity": "sha512-6m8WBhIp0dfwu0SkgfOxJqh+HpdyfqSSLfKKRZSFbDuEQXDDndb8fTpRWkUrX/uBenkex3MgnVk0J3b3Y5byog==",
|
||||||
|
"dev": true,
|
||||||
|
"peerDependencies": {
|
||||||
|
"@volar/vue-language-plugin-pug": "^1.0.4",
|
||||||
|
"@volar/vue-typescript": "^1.0.4",
|
||||||
|
"prettier": ">=2.0",
|
||||||
|
"typescript": ">=2.9"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"@volar/vue-language-plugin-pug": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"@volar/vue-typescript": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/prop-types": {
|
"node_modules/prop-types": {
|
||||||
"version": "15.8.1",
|
"version": "15.8.1",
|
||||||
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
"eslint-config-next": "14.1.0",
|
"eslint-config-next": "14.1.0",
|
||||||
"postcss": "^8",
|
"postcss": "^8",
|
||||||
"prettier": "^3.2.5",
|
"prettier": "^3.2.5",
|
||||||
|
"prettier-plugin-organize-imports": "^3.2.4",
|
||||||
"tailwindcss": "^3.3.0",
|
"tailwindcss": "^3.3.0",
|
||||||
"typescript": "^5"
|
"typescript": "^5"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { affiliations } from '@/app/db/data'
|
|
||||||
import { notFound } from 'next/navigation'
|
|
||||||
import { Zilla_Slab } from 'next/font/google'
|
|
||||||
import findDocumentsByAffiliation from './findDocumentsByAffiliation'
|
|
||||||
import { Fragment } from 'react'
|
|
||||||
import DocumentCard from '@/app/components/DocumentCard'
|
import DocumentCard from '@/app/components/DocumentCard'
|
||||||
|
import { affiliations } from '@/app/db/data'
|
||||||
|
import { Zilla_Slab } from 'next/font/google'
|
||||||
import Image from 'next/image'
|
import Image from 'next/image'
|
||||||
|
import { notFound } from 'next/navigation'
|
||||||
|
import { Fragment } from 'react'
|
||||||
|
import findDocumentsByAffiliation from './findDocumentsByAffiliation'
|
||||||
|
|
||||||
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { affiliations } from '@/app/db/data'
|
import { affiliations } from '@/app/db/data'
|
||||||
import { notFound } from 'next/navigation'
|
|
||||||
import { Zilla_Slab } from 'next/font/google'
|
import { Zilla_Slab } from 'next/font/google'
|
||||||
import getAffiliations from './getAffiliations'
|
|
||||||
import { Fragment } from 'react'
|
|
||||||
import Image from 'next/image'
|
import Image from 'next/image'
|
||||||
|
import { notFound } from 'next/navigation'
|
||||||
|
import { Fragment } from 'react'
|
||||||
|
import getAffiliations from './getAffiliations'
|
||||||
|
|
||||||
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ const AffiliationCard = ({
|
||||||
alt='profile'
|
alt='profile'
|
||||||
width={1000}
|
width={1000}
|
||||||
height={1000}
|
height={1000}
|
||||||
className='rounded-lg mx-auto p-8 object-cover w-full h-full'
|
className='rounded-lg mx-auto p-8 object-contain w-full h-full'
|
||||||
src={image}
|
src={image}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Document, Author, Affiliation, Topic, Nationality } from './data'
|
import { Affiliation, Author, Document, Nationality, Topic } from './data'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads a document with the given ID using a web worker if available, and returns a promise that resolves with the document.
|
* Loads a document with the given ID using a web worker if available, and returns a promise that resolves with the document.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { authors, Author } from '../data'
|
import { Author, authors } from '../data'
|
||||||
|
|
||||||
export function getAuthorsById(authorIds: string[]): { [key: string]: Author } {
|
export function getAuthorsById(authorIds: string[]): { [key: string]: Author } {
|
||||||
const result: { [key: string]: Author } = {}
|
const result: { [key: string]: Author } = {}
|
||||||
|
|
Loading…
Reference in a new issue