mirror of
https://github.com/uetchy/namae.git
synced 2025-10-14 23:22:19 +09:00
fix: example query
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import {useTranslation} from 'react-i18next';
|
||||
import {Link} from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import {
|
||||
FaMapSigns,
|
||||
@@ -19,12 +19,12 @@ import {
|
||||
FaJsSquare,
|
||||
FaBuilding,
|
||||
} from 'react-icons/fa';
|
||||
import {IoIosBeer} from 'react-icons/io';
|
||||
import {DiRust, DiHeroku, DiFirebase} from 'react-icons/di';
|
||||
import { IoIosBeer } from 'react-icons/io';
|
||||
import { DiRust, DiHeroku, DiFirebase } from 'react-icons/di';
|
||||
|
||||
import {SpectrumIcon, NowIcon, NetlifyIcon, OcamlIcon} from './Icons';
|
||||
import {mobile} from '../util/css';
|
||||
import {sendGettingStartedEvent} from '../util/analytics';
|
||||
import { SpectrumIcon, NowIcon, NetlifyIcon, OcamlIcon } from './Icons';
|
||||
import { mobile } from '../util/css';
|
||||
import { sendGettingStartedEvent } from '../util/analytics';
|
||||
|
||||
const supportedProviders: Record<string, React.ReactNode> = {
|
||||
domains: <FaMapSigns />,
|
||||
@@ -53,7 +53,7 @@ const supportedProviders: Record<string, React.ReactNode> = {
|
||||
};
|
||||
|
||||
const Welcome: React.FC = () => {
|
||||
const {t} = useTranslation();
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<Container>
|
||||
@@ -63,8 +63,8 @@ const Welcome: React.FC = () => {
|
||||
<ButtonContainer>
|
||||
<List>
|
||||
<ListButton>
|
||||
<Link to="/s/Tooth" onClick={() => sendGettingStartedEvent()}>
|
||||
{t('gettingStarted')}
|
||||
<Link to="/s/namae" onClick={() => sendGettingStartedEvent()}>
|
||||
{t('gettingStartedWithExample')}
|
||||
</Link>
|
||||
</ListButton>
|
||||
</List>
|
||||
|
@@ -4,14 +4,14 @@ import 'rc-tooltip/assets/bootstrap.css';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { Router } from 'react-router-dom';
|
||||
import { ToastContainer } from 'react-toastify';
|
||||
import { toast, ToastContainer } from 'react-toastify';
|
||||
import 'react-toastify/dist/ReactToastify.css';
|
||||
import App from './App';
|
||||
import * as serviceWorker from './serviceWorker';
|
||||
import { store, wrapHistoryWithStoreHandler } from './store';
|
||||
import { initSentry, wrapHistoryWithGA } from './util/analytics';
|
||||
import { compose } from './util/array';
|
||||
import { initCrisp } from './util/crip';
|
||||
import { initCrisp } from './util/crisp';
|
||||
import './util/i18n';
|
||||
import { FullScreenSuspense } from './util/suspense';
|
||||
|
||||
@@ -36,23 +36,22 @@ ReactDOM.render(
|
||||
document.getElementById('root'),
|
||||
);
|
||||
|
||||
serviceWorker.unregister();
|
||||
// TODO: gracefully update service worker
|
||||
// serviceWorker.register({
|
||||
// onUpdate: (registration) => {
|
||||
// console.log('Update available');
|
||||
serviceWorker.register({
|
||||
onUpdate: (registration) => {
|
||||
console.log('Update available');
|
||||
|
||||
// toast.dark('New version available! Click here to update.', {
|
||||
// onClose: () => {
|
||||
// window.location.reload();
|
||||
// },
|
||||
// position: 'top-right',
|
||||
// autoClose: false,
|
||||
// closeButton: false,
|
||||
// closeOnClick: true,
|
||||
// });
|
||||
// if (registration && registration.waiting) {
|
||||
// registration.waiting.postMessage({ type: 'SKIP_WAITING' });
|
||||
// }
|
||||
// },
|
||||
// });
|
||||
toast.dark('New version available! Click here to update.', {
|
||||
onClose: () => {
|
||||
window.location.reload();
|
||||
},
|
||||
position: 'top-right',
|
||||
autoClose: false,
|
||||
closeButton: false,
|
||||
closeOnClick: true,
|
||||
});
|
||||
|
||||
if (registration && registration.waiting) {
|
||||
registration.waiting.postMessage({ type: 'SKIP_WAITING' });
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@@ -3,9 +3,9 @@ import Backend from 'i18next-chained-backend';
|
||||
import LocalStorageBackend from 'i18next-localstorage-backend';
|
||||
import XHR from 'i18next-xhr-backend';
|
||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||
import {initReactI18next} from 'react-i18next';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
|
||||
const TRANSLATION_VERSION = '1.17';
|
||||
const TRANSLATION_VERSION = '1.18';
|
||||
|
||||
i18n
|
||||
.use(Backend)
|
||||
@@ -16,7 +16,7 @@ i18n
|
||||
backends: [LocalStorageBackend, XHR],
|
||||
backendOptions: [
|
||||
{
|
||||
versions: {en: TRANSLATION_VERSION, ja: TRANSLATION_VERSION},
|
||||
versions: { en: TRANSLATION_VERSION, ja: TRANSLATION_VERSION },
|
||||
},
|
||||
],
|
||||
},
|
||||
|
Reference in New Issue
Block a user