mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
added helmet title to all views
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import React, { useState, useEffect, useRef, Fragment } from 'react';
|
import React, { useState, useEffect, useRef, Fragment } from 'react';
|
||||||
import { Link, useNavigate, useParams } from 'react-router-dom';
|
import { Helmet } from 'react-helmet-async';
|
||||||
import InfiniteScroll from 'react-infinite-scroller';
|
import InfiniteScroll from 'react-infinite-scroller';
|
||||||
|
import { Link, useNavigate, useParams } from 'react-router-dom';
|
||||||
import { Tooltip } from 'react-tooltip';
|
import { Tooltip } from 'react-tooltip';
|
||||||
import { useFeed, usePublishComment } from '@plebbit/plebbit-react-hooks';
|
import { useFeed, usePublishComment } from '@plebbit/plebbit-react-hooks';
|
||||||
import { debounce } from 'lodash';
|
import { debounce } from 'lodash';
|
||||||
@@ -226,6 +227,10 @@ const Board = () => {
|
|||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<Helmet>
|
||||||
|
<title>{((selectedTitle ? selectedTitle : selectedAddress) + " - plebchan")}</title>
|
||||||
|
</Helmet>
|
||||||
<Container>
|
<Container>
|
||||||
<ReplyModal
|
<ReplyModal
|
||||||
selectedStyle={selectedStyle}
|
selectedStyle={selectedStyle}
|
||||||
@@ -917,6 +922,7 @@ const Board = () => {
|
|||||||
</div>
|
</div>
|
||||||
</BoardForm>
|
</BoardForm>
|
||||||
</Container>
|
</Container>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React, { useState, useEffect, useRef, Fragment } from 'react';
|
import React, { useState, useEffect, useRef, Fragment } from 'react';
|
||||||
import { Link, useNavigate, useParams } from 'react-router-dom';
|
import { Helmet } from 'react-helmet-async';
|
||||||
import InfiniteScroll from 'react-infinite-scroller';
|
import InfiniteScroll from 'react-infinite-scroller';
|
||||||
|
import { Link, useNavigate, useParams } from 'react-router-dom';
|
||||||
import { useFeed, usePublishComment } from '@plebbit/plebbit-react-hooks';
|
import { useFeed, usePublishComment } from '@plebbit/plebbit-react-hooks';
|
||||||
import { debounce } from 'lodash';
|
import { debounce } from 'lodash';
|
||||||
import useGeneralStore from '../../hooks/stores/useGeneralStore';
|
import useGeneralStore from '../../hooks/stores/useGeneralStore';
|
||||||
@@ -202,6 +203,10 @@ const Catalog = () => {
|
|||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<Helmet>
|
||||||
|
<title>{((selectedTitle ? selectedTitle : selectedAddress) + " - Catalog - plebchan")}</title>
|
||||||
|
</Helmet>
|
||||||
<Container>
|
<Container>
|
||||||
<SettingsModal
|
<SettingsModal
|
||||||
selectedStyle={selectedStyle}
|
selectedStyle={selectedStyle}
|
||||||
@@ -406,6 +411,7 @@ const Catalog = () => {
|
|||||||
)}
|
)}
|
||||||
</Threads>
|
</Threads>
|
||||||
</Container>
|
</Container>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { useEffect, useRef } from 'react';
|
import React, { useEffect, useRef } from 'react';
|
||||||
|
import { Helmet } from 'react-helmet-async';
|
||||||
import useGeneralStore from '../../hooks/stores/useGeneralStore';
|
import useGeneralStore from '../../hooks/stores/useGeneralStore';
|
||||||
import { Link, useNavigate } from 'react-router-dom';
|
import { Link, useNavigate } from 'react-router-dom';
|
||||||
import { Container, Header, Logo, Page, Search, About, AboutTitle, AboutContent, Boards, BoardsTitle, BoardsContent, Footer } from '../styled/Home.styled';
|
import { Container, Header, Logo, Page, Search, About, AboutTitle, AboutContent, Boards, BoardsTitle, BoardsContent, Footer } from '../styled/Home.styled';
|
||||||
@@ -28,6 +29,10 @@ const Home = () => {
|
|||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<Helmet>
|
||||||
|
<title>plebchan</title>
|
||||||
|
</Helmet>
|
||||||
<Container>
|
<Container>
|
||||||
<Header>
|
<Header>
|
||||||
<Logo>
|
<Logo>
|
||||||
@@ -125,6 +130,7 @@ const Home = () => {
|
|||||||
</ul>
|
</ul>
|
||||||
</Footer>
|
</Footer>
|
||||||
</Container>
|
</Container>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
|
import { Helmet } from 'react-helmet-async';
|
||||||
import useGeneralStore from '../../hooks/stores/useGeneralStore';
|
import useGeneralStore from '../../hooks/stores/useGeneralStore';
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { Container, Header, Logo, Page, Boards, BoardsTitle } from '../styled/Home.styled';
|
import { Container, Header, Logo, Page, Boards, BoardsTitle } from '../styled/Home.styled';
|
||||||
@@ -17,6 +18,10 @@ const NotFound = ({ setBodyStyle }) => {
|
|||||||
}, [setBodyStyle, setSelectedStyle]);
|
}, [setBodyStyle, setSelectedStyle]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<Helmet>
|
||||||
|
<title>plebchan - 404 Not Found</title>
|
||||||
|
</Helmet>
|
||||||
<Container>
|
<Container>
|
||||||
<Header>
|
<Header>
|
||||||
<Logo>
|
<Logo>
|
||||||
@@ -39,6 +44,7 @@ const NotFound = ({ setBodyStyle }) => {
|
|||||||
</Boards>
|
</Boards>
|
||||||
</Page>
|
</Page>
|
||||||
</Container>
|
</Container>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
|
import { Helmet } from 'react-helmet-async';
|
||||||
import { Link, useNavigate, useParams } from 'react-router-dom';
|
import { Link, useNavigate, useParams } from 'react-router-dom';
|
||||||
import { Tooltip } from 'react-tooltip';
|
import { Tooltip } from 'react-tooltip';
|
||||||
import { useAccountComment } from '@plebbit/plebbit-react-hooks';
|
import { useAccountComment } from '@plebbit/plebbit-react-hooks';
|
||||||
@@ -70,6 +71,10 @@ const Pending = () => {
|
|||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<Helmet>
|
||||||
|
<title>{`plebchan - Pending Thread #${parseInt(index) + 1}`}</title>
|
||||||
|
</Helmet>
|
||||||
<Container>
|
<Container>
|
||||||
<SettingsModal
|
<SettingsModal
|
||||||
selectedStyle={selectedStyle}
|
selectedStyle={selectedStyle}
|
||||||
@@ -377,6 +382,7 @@ const Pending = () => {
|
|||||||
)}
|
)}
|
||||||
</BoardForm>
|
</BoardForm>
|
||||||
</Container>
|
</Container>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { useState, useEffect, useRef } from 'react';
|
import React, { useState, useEffect, useRef } from 'react';
|
||||||
|
import { Helmet } from 'react-helmet-async';
|
||||||
import { Link, useNavigate, useParams } from 'react-router-dom';
|
import { Link, useNavigate, useParams } from 'react-router-dom';
|
||||||
import { Tooltip } from 'react-tooltip';
|
import { Tooltip } from 'react-tooltip';
|
||||||
import { useComment, usePublishComment } from '@plebbit/plebbit-react-hooks';
|
import { useComment, usePublishComment } from '@plebbit/plebbit-react-hooks';
|
||||||
@@ -222,6 +223,16 @@ const Thread = () => {
|
|||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<Helmet>
|
||||||
|
<title>
|
||||||
|
{(
|
||||||
|
(comment.content.slice(0, 40)) + " - "
|
||||||
|
+ (selectedTitle ? selectedTitle : selectedAddress)
|
||||||
|
+ " - plebchan"
|
||||||
|
)}
|
||||||
|
</title>
|
||||||
|
</Helmet>
|
||||||
<Container>
|
<Container>
|
||||||
<ReplyModal
|
<ReplyModal
|
||||||
selectedStyle={selectedStyle}
|
selectedStyle={selectedStyle}
|
||||||
@@ -902,6 +913,7 @@ const Thread = () => {
|
|||||||
)}
|
)}
|
||||||
</BoardForm>
|
</BoardForm>
|
||||||
</Container>
|
</Container>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user