mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
don't hardcode version number
This commit is contained in:
@@ -6,6 +6,9 @@ import { StyledModal } from "./styled/SettingsModal.styled";
|
|||||||
import useGeneralStore from "../hooks/stores/useGeneralStore";
|
import useGeneralStore from "../hooks/stores/useGeneralStore";
|
||||||
import useError from "../hooks/useError";
|
import useError from "../hooks/useError";
|
||||||
import useSuccess from "../hooks/useSuccess";
|
import useSuccess from "../hooks/useSuccess";
|
||||||
|
import packageJson from '../../package.json'
|
||||||
|
const {version} = packageJson
|
||||||
|
|
||||||
|
|
||||||
const customOverlayStyles = {
|
const customOverlayStyles = {
|
||||||
overlay: {
|
overlay: {
|
||||||
@@ -158,7 +161,7 @@ const SettingsModal = ({ isOpen, closeModal }) => {
|
|||||||
<div className="panel">
|
<div className="panel">
|
||||||
<div className="panel-header">
|
<div className="panel-header">
|
||||||
<span id="version">
|
<span id="version">
|
||||||
v0.1.0
|
v{version}
|
||||||
</span>
|
</span>
|
||||||
Settings
|
Settings
|
||||||
<Link to="" onClick={handleCloseModal}>
|
<Link to="" onClick={handleCloseModal}>
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ import handleStyleChange from '../../utils/handleStyleChange';
|
|||||||
import renderComments from '../../utils/renderComments';
|
import renderComments from '../../utils/renderComments';
|
||||||
import useClickForm from '../../hooks/useClickForm';
|
import useClickForm from '../../hooks/useClickForm';
|
||||||
import useError from '../../hooks/useError';
|
import useError from '../../hooks/useError';
|
||||||
|
import packageJson from '../../../package.json'
|
||||||
|
const {version} = packageJson
|
||||||
|
|
||||||
|
|
||||||
const Board = () => {
|
const Board = () => {
|
||||||
@@ -987,7 +989,7 @@ const Board = () => {
|
|||||||
</>
|
</>
|
||||||
</NavBar>
|
</NavBar>
|
||||||
<div id="version">
|
<div id="version">
|
||||||
plebchan v0.1.0. GPL-2.0
|
plebchan v{version}. GPL-2.0
|
||||||
</div>
|
</div>
|
||||||
<div className="footer-links"
|
<div className="footer-links"
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ import getCommentMediaInfo from '../../utils/getCommentMediaInfo';
|
|||||||
import handleStyleChange from '../../utils/handleStyleChange';
|
import handleStyleChange from '../../utils/handleStyleChange';
|
||||||
import useClickForm from '../../hooks/useClickForm';
|
import useClickForm from '../../hooks/useClickForm';
|
||||||
import useError from '../../hooks/useError';
|
import useError from '../../hooks/useError';
|
||||||
|
import packageJson from '../../../package.json'
|
||||||
|
const {version} = packageJson
|
||||||
|
|
||||||
|
|
||||||
const Catalog = () => {
|
const Catalog = () => {
|
||||||
@@ -471,7 +473,7 @@ const Catalog = () => {
|
|||||||
</>
|
</>
|
||||||
</NavBar>
|
</NavBar>
|
||||||
<div id="version">
|
<div id="version">
|
||||||
plebchan v0.1.0. GPL-2.0
|
plebchan v{version}. GPL-2.0
|
||||||
</div>
|
</div>
|
||||||
<div className="footer-links"
|
<div className="footer-links"
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ 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';
|
||||||
|
import packageJson from '../../../package.json'
|
||||||
|
const {version} = packageJson
|
||||||
|
|
||||||
|
|
||||||
const Home = () => {
|
const Home = () => {
|
||||||
@@ -134,7 +136,7 @@ const Home = () => {
|
|||||||
fontSize: "11px",
|
fontSize: "11px",
|
||||||
marginBottom: "2em",
|
marginBottom: "2em",
|
||||||
}}>
|
}}>
|
||||||
plebchan v0.1.0. GPL-2.0
|
plebchan v{version}. GPL-2.0
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ 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';
|
||||||
|
import packageJson from '../../../package.json'
|
||||||
|
const {version} = packageJson
|
||||||
|
|
||||||
|
|
||||||
const NotFound = ({ setBodyStyle }) => {
|
const NotFound = ({ setBodyStyle }) => {
|
||||||
@@ -48,7 +50,7 @@ const NotFound = ({ setBodyStyle }) => {
|
|||||||
fontSize: "11px",
|
fontSize: "11px",
|
||||||
marginTop: "2em",
|
marginTop: "2em",
|
||||||
}}>
|
}}>
|
||||||
plebchan v0.1.0. GPL-2.0
|
plebchan v{version}. GPL-2.0
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ import getDate from '../../utils/getDate';
|
|||||||
import handleQuoteClick from '../../utils/handleQuoteClick';
|
import handleQuoteClick from '../../utils/handleQuoteClick';
|
||||||
import handleStyleChange from '../../utils/handleStyleChange';
|
import handleStyleChange from '../../utils/handleStyleChange';
|
||||||
import useError from '../../hooks/useError';
|
import useError from '../../hooks/useError';
|
||||||
|
import packageJson from '../../../package.json'
|
||||||
|
const {version} = packageJson
|
||||||
|
|
||||||
|
|
||||||
const Pending = () => {
|
const Pending = () => {
|
||||||
@@ -381,7 +383,7 @@ const Pending = () => {
|
|||||||
marginTop: "2em",
|
marginTop: "2em",
|
||||||
marginBottom: "2em",
|
marginBottom: "2em",
|
||||||
}}>
|
}}>
|
||||||
plebchan v0.1.0. GPL-2.0
|
plebchan v{version}. GPL-2.0
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ import handleStyleChange from '../../utils/handleStyleChange';
|
|||||||
import renderThreadComments from '../../utils/renderThreadComments';
|
import renderThreadComments from '../../utils/renderThreadComments';
|
||||||
import useClickForm from '../../hooks/useClickForm';
|
import useClickForm from '../../hooks/useClickForm';
|
||||||
import useError from '../../hooks/useError';
|
import useError from '../../hooks/useError';
|
||||||
|
import packageJson from '../../../package.json'
|
||||||
|
const {version} = packageJson
|
||||||
|
|
||||||
|
|
||||||
const Thread = () => {
|
const Thread = () => {
|
||||||
@@ -1032,7 +1034,7 @@ const Thread = () => {
|
|||||||
</>
|
</>
|
||||||
</NavBar>
|
</NavBar>
|
||||||
<div id="version">
|
<div id="version">
|
||||||
plebchan v0.1.0. GPL-2.0
|
plebchan v{version}. GPL-2.0
|
||||||
</div>
|
</div>
|
||||||
<div className="footer-links"
|
<div className="footer-links"
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
Reference in New Issue
Block a user