mirror of
https://github.com/DustinBrett/daedalOS.git
synced 2026-01-15 12:15:02 +00:00
Get rid of i18n and add next export
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
- Buffer urls aren't cleaned up
|
- Buffer urls aren't cleaned up
|
||||||
- Background blur doesn't work in Firefox
|
- Background blur doesn't work in Firefox
|
||||||
- NPM Issues (Use nvm/.nvmrc/yarn)
|
- NPM Issues (Use nvm/.nvmrc/yarn)
|
||||||
|
- HTML lang tag is unset
|
||||||
- App doesn't load in IE11
|
- App doesn't load in IE11
|
||||||
|
|
||||||
## File Manager
|
## File Manager
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import config from 'next.config';
|
|
||||||
import { useRouter } from 'next/router';
|
|
||||||
import { useTheme } from 'styled-components';
|
import { useTheme } from 'styled-components';
|
||||||
|
import { DEFAULT_LOCALE } from 'utils/constants';
|
||||||
|
|
||||||
type LocaleTimeDate = {
|
type LocaleTimeDate = {
|
||||||
date: string;
|
date: string;
|
||||||
@@ -9,10 +8,13 @@ type LocaleTimeDate = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const useLocaleDateTime = (now: Date): LocaleTimeDate => {
|
const useLocaleDateTime = (now: Date): LocaleTimeDate => {
|
||||||
const { locale = config.i18n.defaultLocale } = useRouter() || {};
|
|
||||||
const { formats } = useTheme();
|
const { formats } = useTheme();
|
||||||
const date = new Intl.DateTimeFormat(locale, formats.date).format(now);
|
const date = new Intl.DateTimeFormat(DEFAULT_LOCALE, formats.date).format(
|
||||||
const time = new Intl.DateTimeFormat(locale, formats.time).format(now);
|
now
|
||||||
|
);
|
||||||
|
const time = new Intl.DateTimeFormat(DEFAULT_LOCALE, formats.time).format(
|
||||||
|
now
|
||||||
|
);
|
||||||
const dateTime = now.toISOString();
|
const dateTime = now.toISOString();
|
||||||
|
|
||||||
return { date, time, dateTime };
|
return { date, time, dateTime };
|
||||||
|
|||||||
@@ -2,10 +2,5 @@ module.exports = {
|
|||||||
future: {
|
future: {
|
||||||
webpack5: true
|
webpack5: true
|
||||||
},
|
},
|
||||||
i18n: {
|
|
||||||
localeDetection: false,
|
|
||||||
locales: ['en'],
|
|
||||||
defaultLocale: 'en'
|
|
||||||
},
|
|
||||||
reactStrictMode: true
|
reactStrictMode: true
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "npm run build:fs && next build",
|
"build": "npm run build:fs && next build",
|
||||||
"build:fs": "cd public && node ../node_modules/browserfs/dist/scripts/make_http_index.js > .index/fs.bfs.json && node ../components/apps/V86/fs2json.js --exclude .index --out .index/fs.9p.json .",
|
"build:fs": "cd public && node ../node_modules/browserfs/dist/scripts/make_http_index.js > .index/fs.bfs.json && node ../components/apps/V86/fs2json.js --exclude .index --out .index/fs.9p.json .",
|
||||||
|
"export": "next export",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"eslint": "eslint .",
|
"eslint": "eslint .",
|
||||||
"stylelint": "stylelint **/*.ts",
|
"stylelint": "stylelint **/*.ts",
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import type { Size } from 'components/system/Window/RndWindow/useResizable';
|
import type { Size } from 'components/system/Window/RndWindow/useResizable';
|
||||||
import type { Position } from 'react-rnd';
|
import type { Position } from 'react-rnd';
|
||||||
|
|
||||||
|
export const DEFAULT_LOCALE = 'en';
|
||||||
|
|
||||||
export const DEFAULT_WINDOW_POSITION: Position = {
|
export const DEFAULT_WINDOW_POSITION: Position = {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0
|
y: 0
|
||||||
|
|||||||
Reference in New Issue
Block a user