onedrive/pages/_app.tsx

124 lines
2.2 KiB
TypeScript
Raw Normal View History

2021-06-22 11:58:37 +00:00
import '../styles/globals.css'
2021-08-23 15:14:08 +00:00
import '../styles/prism-vsc-dark.css'
import '../styles/markdown-github.css'
2021-06-23 20:27:51 +00:00
import { library } from '@fortawesome/fontawesome-svg-core'
import {
faFileImage,
faFilePdf,
faFileWord,
faFilePowerpoint,
faFileExcel,
faFileAudio,
faFileVideo,
faFileArchive,
faFileCode,
faFileAlt,
faFile,
faFolder,
faCopy,
faArrowAltCircleDown,
2021-08-30 13:34:37 +00:00
faTrashAlt,
2021-08-30 14:51:19 +00:00
faEnvelope,
faFlag,
faCheckCircle,
2021-06-23 20:27:51 +00:00
} from '@fortawesome/free-regular-svg-icons'
import {
2022-01-16 16:08:04 +00:00
faSearch,
faCheck,
faPlus,
faMinus,
faCopy as faCopySolid,
faAngleRight,
faDownload,
faMusic,
faArrowLeft,
faArrowRight,
faFileDownload,
2021-06-29 20:00:05 +00:00
faUndo,
2021-07-24 08:31:46 +00:00
faBook,
2021-08-30 13:34:37 +00:00
faKey,
2021-08-30 14:51:19 +00:00
faSignOutAlt,
faCloud,
faChevronCircleDown,
faChevronDown,
faLink,
faExternalLinkAlt,
faExclamationCircle,
faExclamationTriangle,
faTh,
2022-02-05 09:25:46 +00:00
faThLarge,
faThList,
faHome,
2022-02-08 15:30:12 +00:00
faLanguage,
} from '@fortawesome/free-solid-svg-icons'
2021-12-20 09:10:29 +00:00
import * as Icons from '@fortawesome/free-brands-svg-icons'
2021-06-23 20:27:51 +00:00
2021-06-22 11:58:37 +00:00
import type { AppProps } from 'next/app'
import NextNProgress from 'nextjs-progressbar'
2022-02-05 22:18:26 +00:00
import { appWithTranslation } from 'next-i18next'
2021-06-22 11:58:37 +00:00
2021-12-20 09:10:29 +00:00
// import all brand icons with tree-shaking so all icons can be referenced in the app
const iconList = Object.keys(Icons)
.filter(k => k !== 'fab' && k !== 'prefix')
.map(icon => Icons[icon])
2021-06-23 20:27:51 +00:00
library.add(
faFileImage,
faFilePdf,
faFileWord,
faFilePowerpoint,
faFileExcel,
faFileAudio,
faFileVideo,
faFileArchive,
faFileCode,
faFileAlt,
faFile,
faFlag,
2021-06-23 20:27:51 +00:00
faFolder,
faMusic,
faArrowLeft,
2021-06-25 14:15:00 +00:00
faArrowRight,
faAngleRight,
faFileDownload,
faCopy,
faCopySolid,
faPlus,
faMinus,
2021-06-29 20:00:05 +00:00
faDownload,
faLink,
2021-07-24 08:31:46 +00:00
faUndo,
faBook,
2021-08-30 13:34:37 +00:00
faArrowAltCircleDown,
faKey,
2021-08-30 14:51:19 +00:00
faTrashAlt,
faSignOutAlt,
faEnvelope,
2021-09-04 14:28:49 +00:00
faCloud,
2021-12-20 09:10:29 +00:00
faChevronCircleDown,
faExternalLinkAlt,
faExclamationCircle,
faExclamationTriangle,
faHome,
faCheck,
faCheckCircle,
2022-01-16 16:08:04 +00:00
faSearch,
faChevronDown,
faTh,
2022-02-05 09:25:46 +00:00
faThLarge,
faThList,
2022-02-08 15:30:12 +00:00
faLanguage,
...iconList
2021-06-23 20:27:51 +00:00
)
2021-06-22 11:58:37 +00:00
function MyApp({ Component, pageProps }: AppProps) {
return (
<>
2021-12-28 18:13:17 +00:00
<NextNProgress height={1} color="rgb(156, 163, 175, 0.9)" options={{ showSpinner: false }} />
<Component {...pageProps} />
</>
)
2021-06-22 11:58:37 +00:00
}
2022-02-05 22:18:26 +00:00
export default appWithTranslation(MyApp)