mirror of
https://github.com/IT4Change/ohmyform-ui.git
synced 2025-12-13 09:45:50 +00:00
remove next/image to fix static exports
fixes https://github.com/ohmyform/ohmyform/issues/154
This commit is contained in:
parent
5e2596f131
commit
bc56a70fea
@ -37,6 +37,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- android screen size fix (https://github.com/ohmyform/ohmyform/issues/114)
|
- android screen size fix (https://github.com/ohmyform/ohmyform/issues/114)
|
||||||
- sending finish mutation (https://github.com/ohmyform/ui/pull/67)
|
- sending finish mutation (https://github.com/ohmyform/ui/pull/67)
|
||||||
- fix dev documentation (https://github.com/ohmyform/ui/issues/65)
|
- fix dev documentation (https://github.com/ohmyform/ui/issues/65)
|
||||||
|
- remove next/image as it does not work with static exports (https://github.com/ohmyform/ohmyform/issues/154)
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,11 @@
|
|||||||
import { CaretDownOutlined, UserOutlined } from '@ant-design/icons'
|
import { CaretDownOutlined, UserOutlined } from '@ant-design/icons'
|
||||||
import { MenuFoldOutlined, MenuUnfoldOutlined } from '@ant-design/icons/lib'
|
import { MenuFoldOutlined, MenuUnfoldOutlined } from '@ant-design/icons/lib'
|
||||||
import { Alert, Dropdown, Layout, Menu, PageHeader, Select, Space, Spin, Tag } from 'antd'
|
import { Alert, Dropdown, Layout, Menu, PageHeader, Select, Space, Spin, Tag } from 'antd'
|
||||||
import Image from 'next/image'
|
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { useRouter } from 'next/router'
|
import { useRouter } from 'next/router'
|
||||||
import React, { CSSProperties, FunctionComponent } from 'react'
|
import React, { CSSProperties, FunctionComponent } from 'react'
|
||||||
import GitHubButton from 'react-github-button'
|
import GitHubButton from 'react-github-button'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import LogoWhitePng from '../assets/images/logo_white.png'
|
|
||||||
import { useMeQuery } from '../graphql/query/me.query'
|
import { useMeQuery } from '../graphql/query/me.query'
|
||||||
import { languages } from '../i18n'
|
import { languages } from '../i18n'
|
||||||
import { sideMenu, SideMenuElement } from './sidemenu'
|
import { sideMenu, SideMenuElement } from './sidemenu'
|
||||||
@ -176,10 +174,8 @@ export const Structure: FunctionComponent<Props> = (props) => {
|
|||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
}}>
|
}}>
|
||||||
<Image
|
<img
|
||||||
src={LogoWhitePng.src}
|
src={require('../assets/images/logo_white.png?resize&size=256')}
|
||||||
width={1608 / 12}
|
|
||||||
height={530 / 12}
|
|
||||||
alt={'OhMyForm'}
|
alt={'OhMyForm'}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
1
next-env.d.ts
vendored
1
next-env.d.ts
vendored
@ -1,5 +1,4 @@
|
|||||||
/// <reference types="next" />
|
/// <reference types="next" />
|
||||||
/// <reference types="next/image-types/global" />
|
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// NOTE: This file should not be edited
|
||||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
||||||
|
|||||||
@ -1,9 +1,18 @@
|
|||||||
const p = require('./package.json')
|
const p = require('./package.json')
|
||||||
|
const optimizedImages = require('next-optimized-images')
|
||||||
|
const withPlugins = require('next-compose-plugins')
|
||||||
|
|
||||||
const environment = process.env.NODE_ENV ? process.env.NODE_ENV : 'dev';
|
const environment = process.env.NODE_ENV ? process.env.NODE_ENV : 'dev';
|
||||||
const version = p.version;
|
const version = p.version;
|
||||||
|
|
||||||
module.exports = {
|
module.exports = withPlugins([
|
||||||
|
optimizedImages({
|
||||||
|
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
images: {
|
||||||
|
disableStaticImages: true,
|
||||||
|
},
|
||||||
poweredByHeader: true,
|
poweredByHeader: true,
|
||||||
productionBrowserSourceMaps: true,
|
productionBrowserSourceMaps: true,
|
||||||
publicRuntimeConfig: {
|
publicRuntimeConfig: {
|
||||||
@ -19,3 +28,4 @@ module.exports = {
|
|||||||
version,
|
version,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
])
|
||||||
|
|||||||
@ -24,9 +24,13 @@
|
|||||||
"graphql": "^15.8.0",
|
"graphql": "^15.8.0",
|
||||||
"i18next": "^21.6.4",
|
"i18next": "^21.6.4",
|
||||||
"i18next-browser-languagedetector": "^6.1.2",
|
"i18next-browser-languagedetector": "^6.1.2",
|
||||||
|
"imagemin-optipng": "^8.0.0",
|
||||||
"isomorphic-fetch": "^3.0.0",
|
"isomorphic-fetch": "^3.0.0",
|
||||||
|
"jimp": "^0.16.1",
|
||||||
"mathjs": "^10.0.2",
|
"mathjs": "^10.0.2",
|
||||||
"next": "^12.0.7",
|
"next": "^12.0.7",
|
||||||
|
"next-compose-plugins": "^2.2.1",
|
||||||
|
"next-optimized-images": "^2.6.2",
|
||||||
"next-redux-wrapper": "^7.0.5",
|
"next-redux-wrapper": "^7.0.5",
|
||||||
"polished": "^4.1.3",
|
"polished": "^4.1.3",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
@ -41,6 +45,7 @@
|
|||||||
"redux": "^4.1.2",
|
"redux": "^4.1.2",
|
||||||
"redux-devtools-extension": "^2.13.9",
|
"redux-devtools-extension": "^2.13.9",
|
||||||
"redux-thunk": "^2.4.1",
|
"redux-thunk": "^2.4.1",
|
||||||
|
"responsive-loader": "^2.3.0",
|
||||||
"sass": "^1.45.2",
|
"sass": "^1.45.2",
|
||||||
"styled-components": "^5.3.3",
|
"styled-components": "^5.3.3",
|
||||||
"swiper": "^7.4.1"
|
"swiper": "^7.4.1"
|
||||||
|
|||||||
@ -2,11 +2,9 @@ import { Alert, Layout } from 'antd'
|
|||||||
import { AuthFooter } from 'components/auth/footer'
|
import { AuthFooter } from 'components/auth/footer'
|
||||||
import { GetStaticProps, NextPage } from 'next'
|
import { GetStaticProps, NextPage } from 'next'
|
||||||
import getConfig from 'next/config'
|
import getConfig from 'next/config'
|
||||||
import Image from 'next/image'
|
|
||||||
import { useRouter } from 'next/router'
|
import { useRouter } from 'next/router'
|
||||||
import React, { useEffect, useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import LogoWhitePng from '../assets/images/logo_white.png'
|
|
||||||
import { LoadingPage } from '../components/loading.page'
|
import { LoadingPage } from '../components/loading.page'
|
||||||
import { Omf } from '../components/omf'
|
import { Omf } from '../components/omf'
|
||||||
import { useStatusQuery } from '../graphql/query/status.query'
|
import { useStatusQuery } from '../graphql/query/status.query'
|
||||||
@ -70,12 +68,11 @@ const Index: NextPage = () => {
|
|||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Image
|
<img
|
||||||
alt={'OhMyForm'}
|
alt={'OhMyForm'}
|
||||||
layout={'responsive'}
|
src={require('../assets/images/logo_white.png?resize&size=512')}
|
||||||
width={1608 / 4}
|
width={1608 / 4}
|
||||||
height={530 / 4}
|
height={530 / 4}
|
||||||
src={LogoWhitePng.src}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -10,13 +10,11 @@ import {
|
|||||||
LoginMutationVariables,
|
LoginMutationVariables,
|
||||||
} from 'graphql/mutation/login.mutation'
|
} from 'graphql/mutation/login.mutation'
|
||||||
import { NextPage } from 'next'
|
import { NextPage } from 'next'
|
||||||
import Image from 'next/image'
|
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { useRouter } from 'next/router'
|
import { useRouter } from 'next/router'
|
||||||
import React, { useState } from 'react'
|
import React, { useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import ReactMarkdown from 'react-markdown'
|
import ReactMarkdown from 'react-markdown'
|
||||||
import LogoWhitePng from '../../assets/images/logo_white.png'
|
|
||||||
import { Omf } from '../../components/omf'
|
import { Omf } from '../../components/omf'
|
||||||
import { useSettingsQuery } from '../../graphql/query/settings.query'
|
import { useSettingsQuery } from '../../graphql/query/settings.query'
|
||||||
import scss from './index.module.scss'
|
import scss from './index.module.scss'
|
||||||
@ -75,11 +73,10 @@ const Index: NextPage = () => {
|
|||||||
marginBottom: 16,
|
marginBottom: 16,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Image
|
<img
|
||||||
src={LogoWhitePng.src}
|
style={{ maxWidth: '100%' }}
|
||||||
|
src={require('../../assets/images/logo_white.png?resize&size=256')}
|
||||||
alt={'OhMyForm'}
|
alt={'OhMyForm'}
|
||||||
width={1608 / 4}
|
|
||||||
height={530 / 4}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -5,12 +5,10 @@ import { AuthLayout } from 'components/auth/layout'
|
|||||||
import { setAuth } from 'components/with.auth'
|
import { setAuth } from 'components/with.auth'
|
||||||
import { RegisterUserData, useRegisterMutation } from 'graphql/mutation/register.mutation'
|
import { RegisterUserData, useRegisterMutation } from 'graphql/mutation/register.mutation'
|
||||||
import { NextPage } from 'next'
|
import { NextPage } from 'next'
|
||||||
import Image from 'next/image'
|
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { useRouter } from 'next/router'
|
import { useRouter } from 'next/router'
|
||||||
import React, { useState } from 'react'
|
import React, { useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import LogoWhitePng from '../assets/images/logo_white.png'
|
|
||||||
import { ErrorPage } from '../components/error.page'
|
import { ErrorPage } from '../components/error.page'
|
||||||
import { Omf } from '../components/omf'
|
import { Omf } from '../components/omf'
|
||||||
import { useSettingsQuery } from '../graphql/query/settings.query'
|
import { useSettingsQuery } from '../graphql/query/settings.query'
|
||||||
@ -77,11 +75,10 @@ const Register: NextPage = () => {
|
|||||||
marginBottom: 16,
|
marginBottom: 16,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Image
|
<img
|
||||||
src={LogoWhitePng.src}
|
style={{ maxWidth: '100%' }}
|
||||||
|
src={require('../assets/images/logo_white.png?resize&size=256')}
|
||||||
alt={'OhMyForm'}
|
alt={'OhMyForm'}
|
||||||
width={1608 / 4}
|
|
||||||
height={530 / 4}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user