This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch move-out-js-based-page in repository https://gitbox.apache.org/repos/asf/incubator-streampark-website.git
commit eca7de8ed08cd376e1a32e2b4c0de133f6e03da7 Author: tison <wander4...@gmail.com> AuthorDate: Thu Apr 25 23:51:24 2024 +0800 Render much HTML for JSX pages Signed-off-by: tison <wander4...@gmail.com> --- src/pages/team/index.jsx | 10 ++++------ src/pages/user/{index.js => index.jsx} | 11 ++++------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/pages/team/index.jsx b/src/pages/team/index.jsx index c04c8dc..6b7a2f2 100644 --- a/src/pages/team/index.jsx +++ b/src/pages/team/index.jsx @@ -22,6 +22,7 @@ export default function () { } return ( + <Layout> <BrowserOnly> {() => { // AOS JS @@ -32,8 +33,7 @@ export default function () { once: !0 }); window.addEventListener('load', AOS.refresh); - return <Layout> - <div className="block team_page" style={{ padding: "10px 0 30px" }}> + return <div className="block team_page" style={{ padding: "10px 0 30px" }}> <h3 className="fs-2 mb-4 fw-bold text-center">StreamPark Team</h3> <hr className="divider my-4 mx-auto" style={{ maxWidth: "10rem" }}></hr> <p className="team_desc team_indent">{dataSource.info.desc}</p> @@ -126,11 +126,9 @@ export default function () { <img src="https://contrib.rocks/image?repo=apache/streampark"/> </div> - </div> - </Layout>; + </div>; }} - </BrowserOnly> - + </Layout> ); } diff --git a/src/pages/user/index.js b/src/pages/user/index.jsx similarity index 94% rename from src/pages/user/index.js rename to src/pages/user/index.jsx index 59e9830..12ff333 100644 --- a/src/pages/user/index.js +++ b/src/pages/user/index.jsx @@ -14,7 +14,8 @@ export default function () { const language = isBrowser && location.pathname.indexOf('/zh-CN/') === 0 ? 'zh-CN' : 'en'; const dataSource = config?.[language]; - return <BrowserOnly> + return <Layout> + <BrowserOnly> {() => { // AOS JS AOS.init({ @@ -24,8 +25,7 @@ export default function () { once: !0 }); window.addEventListener('load', AOS.refresh); - return <Layout> - <div className='block user_page'> + return <div className='block user_page'> <div className="user-main" style={{ padding: "10px 0 30px" }}> <h3 className="fs-2 mb-4 fw-bold text-center">{dataSource.common.ourUsers}</h3> <hr className="divider my-4 mx-auto" style={{ maxWidth: "10rem" }}></hr> @@ -46,10 +46,7 @@ export default function () { </div> </div> </div> - </Layout> }} </BrowserOnly> - - - + </Layout> }