mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-28 04:12:41 +03:00
Use msg here because the memo'ed Home doesn't re-render
And see the line numbers change again in translation files
This commit is contained in:
parent
921943245f
commit
868e613089
3 changed files with 20 additions and 18 deletions
|
@ -526,7 +526,7 @@ msgstr ""
|
||||||
#: src/pages/catchup.jsx:860
|
#: src/pages/catchup.jsx:860
|
||||||
#: src/pages/filters.jsx:89
|
#: src/pages/filters.jsx:89
|
||||||
#: src/pages/followed-hashtags.jsx:40
|
#: src/pages/followed-hashtags.jsx:40
|
||||||
#: src/pages/home.jsx:50
|
#: src/pages/home.jsx:52
|
||||||
#: src/pages/notifications.jsx:488
|
#: src/pages/notifications.jsx:488
|
||||||
msgid "Home"
|
msgid "Home"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1193,7 +1193,7 @@ msgstr ""
|
||||||
#: src/components/nav-menu.jsx:207
|
#: src/components/nav-menu.jsx:207
|
||||||
#: src/components/shortcuts-settings.jsx:58
|
#: src/components/shortcuts-settings.jsx:58
|
||||||
#: src/components/shortcuts-settings.jsx:143
|
#: src/components/shortcuts-settings.jsx:143
|
||||||
#: src/pages/home.jsx:221
|
#: src/pages/home.jsx:223
|
||||||
#: src/pages/mentions.jsx:20
|
#: src/pages/mentions.jsx:20
|
||||||
#: src/pages/mentions.jsx:167
|
#: src/pages/mentions.jsx:167
|
||||||
#: src/pages/settings.jsx:1000
|
#: src/pages/settings.jsx:1000
|
||||||
|
@ -1205,8 +1205,8 @@ msgstr ""
|
||||||
#: src/components/shortcuts-settings.jsx:49
|
#: src/components/shortcuts-settings.jsx:49
|
||||||
#: src/components/shortcuts-settings.jsx:149
|
#: src/components/shortcuts-settings.jsx:149
|
||||||
#: src/pages/filters.jsx:24
|
#: src/pages/filters.jsx:24
|
||||||
#: src/pages/home.jsx:81
|
#: src/pages/home.jsx:83
|
||||||
#: src/pages/home.jsx:181
|
#: src/pages/home.jsx:183
|
||||||
#: src/pages/notifications.jsx:89
|
#: src/pages/notifications.jsx:89
|
||||||
#: src/pages/notifications.jsx:492
|
#: src/pages/notifications.jsx:492
|
||||||
msgid "Notifications"
|
msgid "Notifications"
|
||||||
|
@ -2255,7 +2255,7 @@ msgid "New posts"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/timeline.jsx:548
|
#: src/components/timeline.jsx:548
|
||||||
#: src/pages/home.jsx:210
|
#: src/pages/home.jsx:212
|
||||||
#: src/pages/notifications.jsx:779
|
#: src/pages/notifications.jsx:779
|
||||||
#: src/pages/status.jsx:945
|
#: src/pages/status.jsx:945
|
||||||
#: src/pages/status.jsx:1318
|
#: src/pages/status.jsx:1318
|
||||||
|
@ -2927,15 +2927,15 @@ msgstr ""
|
||||||
msgid "Go to my instance (<0>{currentInstance}</0>)"
|
msgid "Go to my instance (<0>{currentInstance}</0>)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/home.jsx:206
|
#: src/pages/home.jsx:208
|
||||||
msgid "Unable to fetch notifications."
|
msgid "Unable to fetch notifications."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/home.jsx:226
|
#: src/pages/home.jsx:228
|
||||||
msgid "<0>New</0> <1>Follow Requests</1>"
|
msgid "<0>New</0> <1>Follow Requests</1>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/home.jsx:232
|
#: src/pages/home.jsx:234
|
||||||
msgid "See all"
|
msgid "See all"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
@ -526,7 +526,7 @@ msgstr ""
|
||||||
#: src/pages/catchup.jsx:860
|
#: src/pages/catchup.jsx:860
|
||||||
#: src/pages/filters.jsx:89
|
#: src/pages/filters.jsx:89
|
||||||
#: src/pages/followed-hashtags.jsx:40
|
#: src/pages/followed-hashtags.jsx:40
|
||||||
#: src/pages/home.jsx:50
|
#: src/pages/home.jsx:52
|
||||||
#: src/pages/notifications.jsx:488
|
#: src/pages/notifications.jsx:488
|
||||||
msgid "Home"
|
msgid "Home"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1193,7 +1193,7 @@ msgstr ""
|
||||||
#: src/components/nav-menu.jsx:207
|
#: src/components/nav-menu.jsx:207
|
||||||
#: src/components/shortcuts-settings.jsx:58
|
#: src/components/shortcuts-settings.jsx:58
|
||||||
#: src/components/shortcuts-settings.jsx:143
|
#: src/components/shortcuts-settings.jsx:143
|
||||||
#: src/pages/home.jsx:221
|
#: src/pages/home.jsx:223
|
||||||
#: src/pages/mentions.jsx:20
|
#: src/pages/mentions.jsx:20
|
||||||
#: src/pages/mentions.jsx:167
|
#: src/pages/mentions.jsx:167
|
||||||
#: src/pages/settings.jsx:1000
|
#: src/pages/settings.jsx:1000
|
||||||
|
@ -1205,8 +1205,8 @@ msgstr ""
|
||||||
#: src/components/shortcuts-settings.jsx:49
|
#: src/components/shortcuts-settings.jsx:49
|
||||||
#: src/components/shortcuts-settings.jsx:149
|
#: src/components/shortcuts-settings.jsx:149
|
||||||
#: src/pages/filters.jsx:24
|
#: src/pages/filters.jsx:24
|
||||||
#: src/pages/home.jsx:81
|
#: src/pages/home.jsx:83
|
||||||
#: src/pages/home.jsx:181
|
#: src/pages/home.jsx:183
|
||||||
#: src/pages/notifications.jsx:89
|
#: src/pages/notifications.jsx:89
|
||||||
#: src/pages/notifications.jsx:492
|
#: src/pages/notifications.jsx:492
|
||||||
msgid "Notifications"
|
msgid "Notifications"
|
||||||
|
@ -2255,7 +2255,7 @@ msgid "New posts"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/timeline.jsx:548
|
#: src/components/timeline.jsx:548
|
||||||
#: src/pages/home.jsx:210
|
#: src/pages/home.jsx:212
|
||||||
#: src/pages/notifications.jsx:779
|
#: src/pages/notifications.jsx:779
|
||||||
#: src/pages/status.jsx:945
|
#: src/pages/status.jsx:945
|
||||||
#: src/pages/status.jsx:1318
|
#: src/pages/status.jsx:1318
|
||||||
|
@ -2927,15 +2927,15 @@ msgstr ""
|
||||||
msgid "Go to my instance (<0>{currentInstance}</0>)"
|
msgid "Go to my instance (<0>{currentInstance}</0>)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/home.jsx:206
|
#: src/pages/home.jsx:208
|
||||||
msgid "Unable to fetch notifications."
|
msgid "Unable to fetch notifications."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/home.jsx:226
|
#: src/pages/home.jsx:228
|
||||||
msgid "<0>New</0> <1>Follow Requests</1>"
|
msgid "<0>New</0> <1>Follow Requests</1>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/home.jsx:232
|
#: src/pages/home.jsx:234
|
||||||
msgid "See all"
|
msgid "See all"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import './notifications-menu.css';
|
import './notifications-menu.css';
|
||||||
|
|
||||||
import { t, Trans } from '@lingui/macro';
|
import { msg, t, Trans } from '@lingui/macro';
|
||||||
|
import { useLingui } from '@lingui/react';
|
||||||
import { ControlledMenu } from '@szhsin/react-menu';
|
import { ControlledMenu } from '@szhsin/react-menu';
|
||||||
import { memo } from 'preact/compat';
|
import { memo } from 'preact/compat';
|
||||||
import { useEffect, useRef, useState } from 'preact/hooks';
|
import { useEffect, useRef, useState } from 'preact/hooks';
|
||||||
|
@ -24,6 +25,7 @@ import {
|
||||||
} from './notifications';
|
} from './notifications';
|
||||||
|
|
||||||
function Home() {
|
function Home() {
|
||||||
|
const { _ } = useLingui();
|
||||||
const snapStates = useSnapshot(states);
|
const snapStates = useSnapshot(states);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
(async () => {
|
(async () => {
|
||||||
|
@ -47,7 +49,7 @@ function Home() {
|
||||||
<Columns />
|
<Columns />
|
||||||
) : (
|
) : (
|
||||||
<Following
|
<Following
|
||||||
title={t`Home`}
|
title={_(msg`Home`)}
|
||||||
path="/"
|
path="/"
|
||||||
id="home"
|
id="home"
|
||||||
headerStart={false}
|
headerStart={false}
|
||||||
|
|
Loading…
Reference in a new issue