From 71c690d4e0794af03095635643cfabd7175dd0a4 Mon Sep 17 00:00:00 2001 From: Kartik Ohri Date: Thu, 21 Mar 2024 00:46:55 +0530 Subject: [PATCH] Rename ProfileEdit.tsx to SupporterProfileEdit.tsx --- .../{ProfileEdit.tsx => SupporterProfileEdit.tsx} | 8 ++++---- metabrainz/templates/supporters/profile-edit.html | 2 +- webpack.config.js | 10 ++++++++-- 3 files changed, 13 insertions(+), 7 deletions(-) rename frontend/js/src/forms/{ProfileEdit.tsx => SupporterProfileEdit.tsx} (95%) diff --git a/frontend/js/src/forms/ProfileEdit.tsx b/frontend/js/src/forms/SupporterProfileEdit.tsx similarity index 95% rename from frontend/js/src/forms/ProfileEdit.tsx rename to frontend/js/src/forms/SupporterProfileEdit.tsx index fe803715..b3ed8b53 100644 --- a/frontend/js/src/forms/ProfileEdit.tsx +++ b/frontend/js/src/forms/SupporterProfileEdit.tsx @@ -5,7 +5,7 @@ import * as Yup from "yup"; import { getPageProps } from "../utils"; import { Dataset, DatasetsInput, TextInput } from "./utils"; -type ProfileEditProps = { +type SupporterProfileEditProps = { datasets: Dataset[]; is_commercial: boolean; csrf_token: string; @@ -13,13 +13,13 @@ type ProfileEditProps = { initial_errors: any; }; -function ProfileEdit({ +function SupporterProfileEdit({ datasets, is_commercial, csrf_token, initial_form_data, initial_errors, -}: ProfileEditProps): JSX.Element { +}: SupporterProfileEditProps): JSX.Element { return ( <>

Your Profile

@@ -104,7 +104,7 @@ document.addEventListener("DOMContentLoaded", () => { const renderRoot = createRoot(domContainer!); renderRoot.render( - + {% endblock %} diff --git a/webpack.config.js b/webpack.config.js index a6a05933..7e98cbb8 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -48,8 +48,14 @@ module.exports = function (env, argv) { path.resolve(cssDir, "main.less"), ], signupCommercial: path.resolve(jsDir, "src/forms/SignupCommercial.tsx"), - signupNonCommercial: path.resolve(jsDir, "src/forms/SignupNonCommercial.tsx"), - profileEdit: path.resolve(jsDir, "src/forms/ProfileEdit.tsx") + signupNonCommercial: path.resolve( + jsDir, + "src/forms/SignupNonCommercial.tsx" + ), + supporterProfileEdit: path.resolve( + jsDir, + "src/forms/SupporterProfileEdit.tsx" + ), }, output: { filename: isProd ? "[name].[contenthash].js" : "[name].js",