Skip to content

Commit

Permalink
Rename ProfileEdit.tsx to SupporterProfileEdit.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
amCap1712 committed Mar 21, 2024
1 parent 01e3125 commit 71c690d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ 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;
initial_form_data: any;
initial_errors: any;
};

function ProfileEdit({
function SupporterProfileEdit({
datasets,
is_commercial,
csrf_token,
initial_form_data,
initial_errors,
}: ProfileEditProps): JSX.Element {
}: SupporterProfileEditProps): JSX.Element {
return (
<>
<h1 className="page-title">Your Profile</h1>
Expand Down Expand Up @@ -104,7 +104,7 @@ document.addEventListener("DOMContentLoaded", () => {

const renderRoot = createRoot(domContainer!);
renderRoot.render(
<ProfileEdit
<SupporterProfileEdit
datasets={datasets}
is_commercial={is_commercial}
csrf_token={csrf_token}
Expand Down
2 changes: 1 addition & 1 deletion metabrainz/templates/supporters/profile-edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

{% block scripts %}
{{ super() }}
<script src="{{ get_static_path('profileEdit.js') }}" type="text/javascript"></script>
<script src="{{ get_static_path('supporterProfileEdit.js') }}" type="text/javascript"></script>
{% endblock %}
10 changes: 8 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 71c690d

Please sign in to comment.